[issue35158] Fix PEP 3115 to NOT imply that the class dictionary is used in the final created class

2018-11-03 Thread Joy Diamond
New submission from Joy Diamond : Fix the following in https://www.python.org/dev/peps/pep-3115/ REPLACE: """ def __new__(cls, name, bases, classdict): # Note that we replace the classdict with a regular # dict before passing it to the supercl

[issue35106] Add documentation for `type.__subclasses__` to docs.python.org

2018-10-29 Thread Joy Diamond
Joy Diamond added the comment: Documented here: https://docs.python.org/3/library/stdtypes.html#class.__subclasses__ (Though does not appear in google searches) -- stage: -> resolved status: open -> closed ___ Python tracker

[issue35106] Add documentation for `type.__subclasses__` to docs.python.org

2018-10-29 Thread Joy Diamond
New submission from Joy Diamond : Add documentation for `type.__subclasses__` to docs.python.org Python ideas discussion: https://mail.python.org/pipermail/python-ideas/2018-October/054361.html -- assignee: docs@python components: Documentation messages: 328848 nosy: docs@python

[issue35098] Deleting __new__ does not restore previous behavior

2018-10-28 Thread Joy Diamond
Joy Diamond added the comment: Its quite valid to assign to __new__ to replace the behavior of how an instance is created. (Obviously you would not really assign `0` to it; my example was just to show the `del Color.__new__` fails - so what was assigned was not relevant). Here is a more

[issue35098] Deleting __new__ does not restore previous behavior

2018-10-28 Thread Joy Diamond
New submission from Joy Diamond : Related: https://bugs.python.org/issue5322 Consider the following program: class Color(object): __slots__ = (('name',)) def __init__(self, name): self.name = name green = Color('green') # Works assert green.name == &#

[issue35083] Fix documentation for __instancecheck__

2018-10-27 Thread Joy Diamond
New submission from Joy Diamond : This is a request to fix the documentation for __instancecheck__. Please add the following: """ (Note that any object `x` is always considered to be an instance of `type(x)`, and this cannot be overridden.) """ Consider the fo