[Tutor] Good approach regarding classes attributes
Sydney Shall
s.shall at virginmedia.com
Tue Sep 9 15:09:32 CEST 2014
On 08/09/2014 18:39, Alan Gauld wrote:
> 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:
>
A simple question from a newbie, in response to this surprise.
Is it not helpful to always put (object) as the parent, if the class is
not itself a sub-class?
And while I am writing, what does OP stand for in this list?
--
Sydney Shall
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140909/ebcdb792/attachment.html>
More information about the Tutor
mailing list