Skip to content

Commit

Permalink
Encourage kwargs-based initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Dec 29, 2017
1 parent ea99d26 commit 3cffdfa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions changelog.d/298.breaking.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ If you defined a class ``C`` that subclasses ``A`` and ``B`` like ``C(A, B)``, `

This is now fixed and means that in classes that employ multiple inheritance, the output of ``__repr__`` and the order of positional arguments in ``__init__`` changes.
Due to the nature of this bug, a proper deprecation cycle was unfortunately impossible.

Generally speaking, it's advisable to prefer ``kwargs``-based initialization anyways – *especially* if you employ multiple inheritance and diamond-shaped hierarchies.
2 changes: 2 additions & 0 deletions changelog.d/299.breaking.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ If you defined a class ``C`` that subclasses ``A`` and ``B`` like ``C(A, B)``, `

This is now fixed and means that in classes that employ multiple inheritance, the output of ``__repr__`` and the order of positional arguments in ``__init__`` changes.
Due to the nature of this bug, a proper deprecation cycle was unfortunately impossible.

Generally speaking, it's advisable to prefer ``kwargs``-based initialization anyways – *especially* if you employ multiple inheritance and diamond-shaped hierarchies.
2 changes: 2 additions & 0 deletions changelog.d/304.breaking.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ If you defined a class ``C`` that subclasses ``A`` and ``B`` like ``C(A, B)``, `

This is now fixed and means that in classes that employ multiple inheritance, the output of ``__repr__`` and the order of positional arguments in ``__init__`` changes.
Due to the nature of this bug, a proper deprecation cycle was unfortunately impossible.

Generally speaking, it's advisable to prefer ``kwargs``-based initialization anyways – *especially* if you employ multiple inheritance and diamond-shaped hierarchies.

0 comments on commit 3cffdfa

Please sign in to comment.