You can use the classmethod decorator, which is more appropriate for this situation anyways:
class C: class Nested: counter = 0 @classmethod def increment(cls) -> int: cls.counter += 1 return cls.counter print(C().Nested.increment()) # prints 1 If you are wondering why increment can't find Cl_static_parameter_nested in your example: you would have to write Cl_some_class.Cl_static_parameter_nested to access it from the global namespace.