3 ms·
> Namespaces are one honking great idea -- let's do more of those! How that quote got into zen of Python is a bit of a mystery to me. I have no idea what a na
by wodenokoto 4y ago
> Namespaces are one honking great idea -- let's do more of those!
How that quote got into zen of Python is a bit of a mystery to me.
I have no idea what a namespace is in Python or how to create one.
I’ve never come across a guide or pytalk teaching me the benefit of namespaces or why they are a honking great idea.
- benji-york 4y agoNamespaces are pervasive in Python. Virtually everything you deal with is a namespace: package, modules, classes, instances; even functions are namespaces: >>> def func(ns): ... print(ns.stuff) ... >>> func.stuff = 'honking great' >>> func(func) honking great