[Tutor] Good approach regarding classes attributes

Alan Gauld alan.gauld at btinternet.com
Mon Sep 8 18:39:11 CEST 2014


On 08/09/14 15:17, Juan Christian wrote:

One tiny tweak...

> class User():

You don't need the parens after User. You don;t have any superclasses so 
they do nothing. Python convention for an empty parent list is just to 
leave the parens off:

class User:

-- 
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