File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -576,16 +576,19 @@ class Table6(Table):
576576
577577 _cache = weakref .WeakValueDictionary ()
578578
579- def __new__ (cls , name , autocommit = True ):
579+ def __new__ (cls , name , autocommit = None ):
580580 obj = Table6 ._cache .get (name , None )
581581 if not obj :
582582 obj = object .__new__ (cls )
583+ if autocommit is None :
584+ autocommit = True
585+ obj ._init (name , autocommit )
583586 Table6 ._cache [name ] = obj
584- else :
587+ elif autocommit is not None :
585588 obj .autocommit = autocommit
586589 return obj
587590
588- def __init__ (self , name , autocommit = True ):
591+ def _init (self , name , autocommit ):
589592 """
590593 Here *name* is the name of the table to instantiate, if it has already
591594 been instantiated the existing cached object is returned.
You can’t perform that action at this time.
0 commit comments