byoc.BareMeta

class byoc.BareMeta

Bases: type

A metaclass that allows a class to be instantiated either in the usual way, or without calling the constructor. The latter is useful if the object will be initialized in another way, e.g. byoc.param() parameters that read from the command line.

Public Methods:

from_bare()

__call__(*args, **kwargs)

Call self as a function.

Inherited from type

__repr__()

Return repr(self).

__call__(*args, **kwargs)

Call self as a function.

__getattribute__(name, /)

Return getattr(self, name).

__setattr__(name, value, /)

Implement setattr(self, name, value).

__delattr__(name, /)

Implement delattr(self, name).

__init__(*args, **kwargs)

mro()

return a type's method resolution order

__subclasses__()

__prepare__()

used to create the namespace for the class statement

__instancecheck__()

check if an object is an instance

__subclasscheck__()

check if a class is a subclass

__dir__()

specialized __dir__ implementation for types

__sizeof__()

return memory consumption of the type object


__call__(*args, **kwargs)[source]

Call self as a function.

from_bare()[source]