> This means, for a
> middle-sized class implementation, you will start to worry about name
> space collisions pretty quickly among all the class methods.
> Information is no longer perfectly localized but spreading across all
> over your class (and its parents ... which probably in a different
> file ...). thoughts?
>

I agree it has a lot of potential to do most of what you've described.

Seems to me that namespace collisions are a possibility no matter what
namespace you are working in, right? If you are in the global (module)
namespace, and use up a, b, and c, that doesn't seem any different to me
than using up ns.a, ns.b, and ns.c.

In fact, you could say it *expands* your namespace. You can have multiple
HDL namespaces and interact between them without any problems:

# these will be descriptors that store Signal instances
ns1.x = 1
ns2.x = 2
# you can combine them into another namespace
ns3.x = ns1.x+ns2.x
# or into an existing namespace
ns1.y = ns1.x+ns2.x
# or put them into a data structure
x = [ns1.x,  ns2.x, ns3.x]
# and pull them back out again:
ns4.a,  ns4.b, ns4.c = x

Behavior is preserved in all cases.
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to