If you define B and C like this:
class B(A):
some_field = 123
class C(A):
some_field = 123
then:
In [147]: B.some_field
Out[147]: 123
By the way, A(123) would pass 123 to A.__init__. It would not set some_field.
Also, in a class definition,
class B(...)
The stuff in parentheses must be a class or a comma-separated list of classes (or, in Python3, metaclass=SomeMetaClass). It can not be an instance of a class. So
class B(A(123))
is a definite no-no.
In response to the comment: You could use the A.__new__ method to return a class:
class A(object):
some_field = None
def __new__(cls, val):
cls.some_field = val
return cls
class B(A(123)): pass
then
In [161]: B.some_field
Out[161]: 123
But this is a non-standard use of __new__ since usually it is used to return an instance of A. When it does not return an instance of A, then A.__init__ is not called.
Instead of using a class A it would be more understandable to use a class factory:
class B(make_class(123)): ...
as you mentioned in the comment below.