3 ms·
One thing I find odd is to prohibit classes / functions from being imported, instead forcing to always write their module names for the fear of namespace collis
by m_mueller 10y ago
One thing I find odd is to prohibit classes / functions from being imported, instead forcing to always write their module names for the fear of namespace collisions. Is this common for Python in organisations? Did I get something wrong? Seems to a little bit too much on the Java side of this tradeoff.
- strajk 10y agoI prefer importing whole modules too. One of the benefit is much easier code reviews: Imagine this diff in the middle of a file (in Javascript) if (includes(users, userId)) { open(load(userId)) } vs if (_.includes(users, userId)) { Modal.open(UserApi.load(userId)) }
- ju-st 10y agoCode with many from... imports becomes very unreadable very fast.