8000 PY3 allow multiple base classes in six.with_metaclass · nullnotfound/scikit-learn@df74a8a · GitHub
[go: up one dir, main page]

Skip to content

Commit df74a8a

Browse files
miki725larsmans
authored andcommitted
PY3 allow multiple base classes in six.with_metaclass
Imported from https://bitbucket.org/gutworth/six/pull-request/10/fix-for-23-by-allowing-to-specify-multiple/diff
1 parent 972e7cf commit df74a8a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sklearn/externals/six.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ def exec_(_code_, _globs_=None, _locs_=None):
329329
_add_doc(reraise, """Reraise an exception.""")
330330

331331

332-
def with_metaclass(meta, base=object):
332+
def with_metaclass(meta, *bases):
333333
"""Create a base class with a metaclass."""
334-
return meta("NewBase", (base,), {})
334+
bases = bases or (object,)
335+
return meta("NewBase", bases, {})

0 commit comments

Comments
 (0)
0