Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(204565)

Delta Between Two Patch Sets: Doc/whatsnew/3.6.rst

Issue 23722: During metaclass.__init__, super() of the constructed class does not work
Left Patch Set: Created 3 years ago
Right Patch Set: Created 3 years ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
1 **************************** 1 ****************************
2 What's New In Python 3.6 2 What's New In Python 3.6
3 **************************** 3 ****************************
4 4
5 :Release: |release| 5 :Release: |release|
6 :Date: |today| 6 :Date: |today|
7 :Editors: Elvis Pranskevichus <elvis@magic.io>, Yury Selivanov <yury@magic.io> 7 :Editors: Elvis Pranskevichus <elvis@magic.io>, Yury Selivanov <yury@magic.io>
8 8
9 .. Rules for maintenance: 9 .. Rules for maintenance:
10 10
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 super().__init_subclass__(**kwargs) 345 super().__init_subclass__(**kwargs)
346 cls.subclasses.append(cls) 346 cls.subclasses.append(cls)
347 347
348 class Plugin1(PluginBase): 348 class Plugin1(PluginBase):
349 pass 349 pass
350 350
351 class Plugin2(PluginBase): 351 class Plugin2(PluginBase):
352 pass 352 pass
353 353
354 In order to allow zero-argument :func:`super` calls to work correctly from 354 In order to allow zero-argument :func:`super` calls to work correctly from
355 ``__init_subclass__`` implementations, custom metaclasses must ensure that 355 ``__init_subclass__`` implementations, custom metaclasses must ensure that
storchaka 2016/12/04 11:23:35 Your can use a reference for __init_subclass__. W
356 the new ``__classcell__`` namespace entry is propagated to ``type.__new__``. 356 the new ``__classcell__`` namespace entry is propagated to ``type.__new__``.
357 357
358 .. seealso:: 358 .. seealso::
359 359
360 :pep:`487` -- Simpler customization of class creation 360 :pep:`487` -- Simpler customization of class creation
361 PEP written and implemented by Martin Teichmann. 361 PEP written and implemented by Martin Teichmann.
362 362
363 :ref:`Feature documentation <class-customization>` 363 :ref:`Feature documentation <class-customization>`
364 364
365 365
(...skipping 1917 matching lines...) Expand 10 before | Expand all | Expand 10 after
2283 have been modified, the new :opcode:`CALL_FUNCTION_EX` and 2283 have been modified, the new :opcode:`CALL_FUNCTION_EX` and
2284 :opcode:`BUILD_TUPLE_UNPACK_WITH_CALL` have been added, and 2284 :opcode:`BUILD_TUPLE_UNPACK_WITH_CALL` have been added, and
2285 ``CALL_FUNCTION_VAR``, ``CALL_FUNCTION_VAR_KW`` and ``MAKE_CLOSURE`` opcodes 2285 ``CALL_FUNCTION_VAR``, ``CALL_FUNCTION_VAR_KW`` and ``MAKE_CLOSURE`` opcodes
2286 have been removed. 2286 have been removed.
2287 (Contributed by Demur Rumed in :issue:`27095`, and Serhiy Storchaka in 2287 (Contributed by Demur Rumed in :issue:`27095`, and Serhiy Storchaka in
2288 :issue:`27213`, :issue:`28257`.) 2288 :issue:`27213`, :issue:`28257`.)
2289 2289
2290 * The new :opcode:`SETUP_ANNOTATIONS` and :opcode:`STORE_ANNOTATION` opcodes 2290 * The new :opcode:`SETUP_ANNOTATIONS` and :opcode:`STORE_ANNOTATION` opcodes
2291 have been added to support the new :term:`variable annotation` syntax. 2291 have been added to support the new :term:`variable annotation` syntax.
2292 (Contributed by Ivan Levkivskyi in :issue:`27985`.) 2292 (Contributed by Ivan Levkivskyi in :issue:`27985`.)
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+