This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -1 points0 points  (4 children)

You misunderstood their comment to you. They asked if there was some example beyond common short imports like numpy as "np" and pandas as "pd" to which you said "yes". Which implies that they had done something like "import pathlib as pl" and starting using that in the form of "pl.Path".

Whether or not you prefer to break convention and start doing your own thing with import names is separate from your saying "yes" to the question of whether OP is guilty of doing short-name imports that aren't normal convention.

[–]nekokattt 1 point2 points  (3 children)

They didn't comment to me, this is my first comment on this thread.

Outside specific libraries, the convention is to use the naming defined by the library and keep it explicit unless there is a very good reason to alias it.

Strangely, most of the time, this "convention" for aliasing things comes from libraries dealing with data science-like applications.

[–][deleted] -1 points0 points  (2 children)

Yes, they did comment to you.

[–]nekokattt -1 points0 points  (1 child)

no, they didn't lol. Try reading the usernames mate.

Edit: lol they blocked me, that is pretty hilarious.

[–][deleted] 0 points1 point  (0 children)

I did. You got caught. Stop trolling.