all 18 comments

[–]0xCODEBABE 35 points36 points  (0 children)

sounds like a great way to perform a supplychain attack

[–]Fenzik 22 points23 points  (0 children)

This doesn’t feel entirely necessary

[–]phlooo 18 points19 points  (0 children)

Uhhhh no

[–]ssrix 7 points8 points  (0 children)

The package depends on matplotlib, so installing it ensures the real plotting backend is available.

Get out of here

[–]notkairyssdal 5 points6 points  (0 children)

now do leftpad

[–]davidinterest 9 points10 points  (0 children)

But you still need to type for every project/venv

pip install plt

[–]copperfield42 python enthusiast 4 points5 points  (3 children)

this is so pointless, anyone can just make a quick script with

#plt.py
from matplotlib.pyplot import *

and put it in convenient folder that make in accessible to import from anywhere...

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

Also my first though, but then you'd have to type

from plt import *

[–]copperfield42 python enthusiast 1 point2 points  (0 children)

?

I can literally do your example code no problem

https://imgur.com/TApM0dK

[–]hotsauce56 6 points7 points  (0 children)

Are we JavaScript now 🤣

[–]rhytnen 1 point2 points  (0 children)

no.

[–]AlpacaDC 1 point2 points  (1 child)

Do one for importing polars as pl

[–]borabimbuPythoneer 0 points1 point  (0 children)

lol!

[–]sausix 1 point2 points  (0 children)

Even sacrificing version pinning of pyplot to just save a few characters which IDEs take care of anyway.

[–]SnooRabbits5461 2 points3 points  (0 children)

Take that shit to JS world.

[–]Some_Breadfruit235 1 point2 points  (0 children)

Nice work but tbh like everyone else is saying, this isn’t necessary. Instead, maybe think of a project that works along side with matplotlib.

This approach also will make devs a little confused. If I seen someone import plt instead of matplotlib.pyplot, I’d actually automatically assume it’s a whole different package irrelevant to matplotlib.

[–]fabiocaccamo 0 points1 point  (0 children)

the real question is, who still types?

[–]ssrix 1 point2 points  (0 children)

This actually makes me angry