Ton van Vliet a écrit :
> On 24 Nov 2007 13:56:37 GMT, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]>
> wrote:
(snip)
>>So::
>>
>>   def meth(self):
>>       using self:
>>           tmp = raw_input('Enter age: ')
>>           age = int(tmp)
>>
>>becomes::
>>
>>   def meth(self):
>>       using self:
>>           self.tmp = self.raw_input('Enter age: ')
>>           self.age = self.int(tmp)
>>
>>Binding `tmp` unnecessarily to the object and trying to get `raw_input()`
>>and `int()` from the object.  Ouch.  :-)
> 
> 
> Absolutely.
> 
> However, I was more thinking in terms of attributes only

Too bad : in Python, everything's an object, so 'methods' are attributes 
too.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to