With or without leading underscore...

Ulrich Eckhardt eckhardt at satorlaser.com
Mon Aug 10 16:37:25 CEST 2009

...that is the question!

I have a module which exports a type. It also exports a function that
returns instances of that type. Now, the reason for my question is that
while users will directly use instances of the type, they will not create
instances of the type themselves.

So, the type is a part of the public API, but its constructor is not. Should
I mark the type as private (with a leading underscore) or not?



Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932

More information about the Python-list mailing list