Create a new instance of a class. Parameters ---------- cls : type The class to create an instance of. Returns ------- instance : cls A new instance of ``cls``.
(cls)
| 493 | |
| 494 | |
| 495 | def instance(cls): |
| 496 | """Create a new instance of a class. |
| 497 | |
| 498 | Parameters |
| 499 | ---------- |
| 500 | cls : type |
| 501 | The class to create an instance of. |
| 502 | |
| 503 | Returns |
| 504 | ------- |
| 505 | instance : cls |
| 506 | A new instance of ``cls``. |
| 507 | """ |
| 508 | return cls() |
| 509 | |
| 510 | |
| 511 | @instance |
nothing calls this directly
no outgoing calls
no test coverage detected