File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -390,6 +390,10 @@ allow the instance to update if given new parameters.
390
390
c3.x # 3
391
391
assert c1 is c2 is c3 # Okay
392
392
393
+
394
+ @singleton
395
+ ~~~~~~~~~~
396
+
393
397
Additionally, there is a decorator, `@singleton ` that can be used make a class
394
398
a singleton, even if it already uses another metaclass. This is convenient for
395
399
creating singleton Objects.
@@ -410,7 +414,7 @@ creating singleton Objects.
410
414
@metaclass
411
415
~~~~~~~~~~
412
416
413
- Type[T] contains a class decorator, `metaclass `, that will create a derivative
417
+ Type[T] contains a class decorator, `@ metaclass `, that will create a derivative
414
418
metaclass from the given metaclasses and the metaclass used by the decorated
415
419
class and recreate the class with the derived metaclass.
416
420
You can’t perform that action at this time.
0 commit comments