3 ms·
People never seem to fully understand namespaces. You don't need any additional prefixes for classes and functions inside of your module. Its name already does
by densh 14y ago
People never seem to fully understand namespaces. You don't need any additional prefixes for classes and functions inside of your module. Its name already does separate it from everything else. Moreover "from module import *" is evil. Period.
import newstruct as ns
...
x = ns.long()
- DeepDuh 14y agoMakes me think.. is the NS prefix in cocoa frameworks short for "newstruct"? I always wondered about that one.
- spleeyah 14y ago> Cocoa classes begin with the acronym "NS" (standing either for the > NeXT-Sun creation of OpenStep, or for the original proprietary term > for the OpenStep framework, NeXTSTEP) http://en.wikipedia.org/wiki/Cocoa_(API)#Cocoa_history http://en.wikipedia.org/wiki/Cocoa_(API)#Cocoa_history