[Tutor] Good approach regarding classes attributes
Alan Gauld
alan.gauld at btinternet.com
Tue Sep 9 18:53:05 CEST 2014
On 09/09/14 14:44, Peter Otten wrote:
>> Is it not helpful to always put (object) as the parent, if the class is
>> not itself a sub-class?
>
> The answer differs between Python 2 and 3. In Python 3
>
> class C: # preferred in Python 3
> pass
Apologies, I should have mentioned that. I've been using Python3 almost
exclusively since January this year and I'm starting to forget my Python
2 idioms...
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos
More information about the Tutor
mailing list