super() woes (n00b)
Ethan Furman
ethan at stoneleaf.us
Thu Jun 17 15:18:33 EDT 2010
Deadly Dirk wrote:
> On Thu, 17 Jun 2010 13:48:45 -0400, J. Cliff Dyer wrote:
>
>> super gives you an instantiated version of the super class, which means
>> that you don't have to explicitly send self to any methods you call on
>> it.
>>
>> So use `super().__init__()` instead.
>
> Thanks. Interestingly enough, it works in Python 3, which is what the
> book is about. It doesn't work in Python 2.6
as Thomas Jollans said days ago:
> but you should really install Python 3.1 (it's in ubuntu, as others
> have said!) because you will almost certainly hit into other snags.
or, as Gabriele Lanaro said in that same thread:
> else take a book that covers python 2.x syntax
Cut-and-pasting-ly yours,
~Ethan~
More information about the Python-list
mailing list