SebKuzminsky / pycam

Other
340 stars 98 forks source link

Relative import syntax enhances the readability of Python code #84

Closed zancas closed 6 years ago

zancas commented 6 years ago

This is true because it disambiguates within-package imports from system packages.

We should use relative imports everywhere it makes sense to do so.

sumpfralle commented 6 years ago

I think, we are approaching the bike-shedding zone :)

In case of doubt, I like to follow PEP8. Regarding the preferred style of imports it says:

Absolute imports are recommended, as they are usually more readable and tend to be better behaved (or at least give better error messages) ... However, explicit relative imports are an acceptable alternative to absolute imports, especially when dealing with complex package layouts where using absolute imports would be unnecessarily verbose.

Thus I think, absolute imports are quite suitable for pycam.

But maybe someone else has a strong opinion towards a change?

sumpfralle commented 6 years ago

Closing for now based on the lack of opinions raised to support this change.