Cloudthunder wrote:
> How can I set up method delegation so that I can do the following:
>
> A.run()
>
> and have this call refer to the run() method within the boo instance? Also,
> what if I have tons of functions like run() within the boo instance and I
> want all them to be directly accessib
robably want
sorted(blah):
>>> a = [3, 1, 4, 1, 5, 9]
>>> sorted(a)
[1, 1, 3, 4, 5, 9]
>>> a
[3, 1, 4, 1, 5, 9]
>>> a.sort()
>>> a
[1, 1, 3, 4, 5, 9]
--
Ryan Forsythe
--
http://mail.python.org/mailman/listinfo/python-list
Terry Reedy wrote:
> "Felipe Almeida Lessa" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> This works everywhere:
>>
>> nan = float('nan')
>
> Not.
>
nan = float('nan')
>
> Traceback (most recent call last):
> File "", line 1, in -toplevel-
> nan = float('nan')
> Va
Eric wrote:
> I have a string...
>
> str = "tyrtrbd =ffgtyuf == =tyryr =u=p ff"
>
> I want to replace the characters after each '=', what I ended up doing is
> somthing like this...
>
> buf = list(str)
> newchr = '#'
>
> count = 0
> for i in range(len(buf)):
> if buf[count] == '=':
>
Gary Wessle wrote:
> the example was an in-accuretlly representation of a the problem I am
> having. my apologies.
>
> a = []
> def prnt():
>print len(a)
>
prnt
>
>
> I expect to get 0 "the length of list a"
You want prnt(), not prnt:
>>> a = []
>>> def prnt():
... print len(a)
...