A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-January/131701.html below:

Fix CoroWrapper (fix my previous commit)

[Python-Dev] cpython: asyncio: Fix CoroWrapper (fix my previous commit) [Python-Dev] cpython: asyncio: Fix CoroWrapper (fix my previous commit)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 "<stdin>", line 1, in <module>
ValueError: 'egg' in __slots__ conflicts with class variable


>>> class Example:
...     """doc"""
...     __slots__ = ("__doc__",)
...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: '__doc__' in __slots__ conflicts with class variable


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4