[Python-Dev] cpython: asyncio: Fix CoroWrapper (fix my previous commit) (original) (raw)

Christian Heimes christian at python.org
Thu Jan 16 17:14:49 CET 2014


On 16.01.2014 16:57, Guido van Rossum wrote:

Because somehow you can't have a slot named doc and a docstring in the class. Try it. (I tried to work around this but didn't get very far.)

That's true for all class attributes. You can't have a slot and a class attribute at the same time. After all the doc string is stored in a class attribute, too.

class Example: ... slots = ("egg",) ... # This doesn't work ... egg = None ... Traceback (most recent call last): File "", line 1, in ValueError: 'egg' in slots conflicts with class variable

class Example: ... """doc""" ... slots = ("doc",) ... Traceback (most recent call last): File "", line 1, in ValueError: 'doc' in slots conflicts with class variable



More information about the Python-Dev mailing list