Wednesday, 15 February 2012

python - Module naming convention (avoid collisions) -


I am learning Python and I have already created some add-hoc utility modules which I use I do not intend to install them anywhere, they just need to lay down and where they need to be copied, just fine for me.

So I usually just make a file such as mymodule.py and import mymodule from a script in the same directory. For the name I do not use only the lowercase alphabet (i.e., any _ s), so now I have seen some couple of "real" Python modules and realized that the conference is mostly identical, Em> struggling

Is there a conference to give ad hoc module names themselves, so that no core or "PEP" module (even in the future, which is being added yet) can save you from conflict with is?

Similar conference (especially due to CPAN), where all such modules should start with local :: , as Local :: MyCrazyModule .

Note: But he does not seem to ask about a particular module, but rather about the variable names that struggle with the module. The easiest way to struggle with the POP module is to create the dump module with your name and publish it for PP

You can read more about name conversions: and then you can use this top-level namespace for all your models.

No comments:

Post a Comment