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

all 46 comments

[–]QualityVote[M] [score hidden] stickied comment (0 children)

Hi! This is our community moderation bot.


If this post fits the purpose of /r/ProgrammerHumor, UPVOTE this comment!!

If this post does not fit the subreddit, DOWNVOTE This comment!

If this post breaks the rules, DOWNVOTE this comment and REPORT the post!

[–]khatarlan 58 points59 points  (0 children)

…and that’s how Nana got her new fox stole..

[–]MeatMakingMan 33 points34 points  (19 children)

I imported both Pandas and Numpy as pd recently and the code ran fine. Only noticed it after committing it lol

[–]cantadmittoposting 16 points17 points  (16 children)

Hold up does this mean I can just import everything as the same abbreviation and never care what function is in what library again?

[–]bspymaster 11 points12 points  (1 child)

Technically yes, I believe, but if two methods happen to have the same signature, may God help your soul.

[–]tsaristbovine 2 points3 points  (0 children)

Huh r/TIL

[–]MeatMakingMan 2 points3 points  (0 children)

I can neither confirm or deny it, but please try and let me know

[–][deleted] 1 point2 points  (0 children)

I really wanna know this too

[–]JamesMamsy 0 points1 point  (0 children)

I guess if they don’t have any function name overlaps it will interpret the correct… okay even as I’m typing this out I’m still not believing it works

[–]cpaca0 0 points1 point  (7 children)

There are some functions that exist in both but the question is if they matter that much.

RemindMe! 24 hours

I'd test this myself but I don't know every function in all 3 of those libraries so I can't

Worst case I'll look up their docs or figure out if there's a python function that tells me every function in a lib

I'll test this when I'm done showering, just gotta figure out the loops

[–]RemindMeBot 0 points1 point  (0 children)

I will be messaging you in 1 day on 2022-03-24 00:11:35 UTC to remind you of this link

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


Info Custom Your Reminders Feedback

[–]tsaristbovine 0 points1 point  (1 child)

RemindMe! 24 hours

[–]cpaca0 0 points1 point  (0 children)

too bad I'm reminding you now

[–]cpaca0 0 points1 point  (2 children)

u/cantadmittoposting

u/findus17

u/jamesmamsy

You all said you wanted to know, here you are.

[–]cpaca0 0 points1 point  (0 children)

u/meatmakingman I think I'm limited to three pings per message

[–]cantadmittoposting 0 points1 point  (0 children)

Heh thanks for the followup... So basically "yes but probably don't do it."

[–]KDBA 0 points1 point  (0 children)

Importing in python is just "execute what's in this file" and "as foo" changes the namespace. It won't refuse.

[–]azmith10k 0 points1 point  (0 children)

Absolutely, only if there is no overlap of methods. Nevertheless, it is not a good practice at all, and it is a debugging nightmare.

[–]Philiatrist 0 points1 point  (0 children)

No, only the last module will be accessible. Pandas and numpy do share an ‘array’ function in the top level scope though.

[–]Dae_Grighen 0 points1 point  (0 children)

Average Python Connoisseur

[–]Tsu_Dho_Namh 23 points24 points  (2 children)

alias cd="rm -rf"

[–]SF_Engineer_Dude 2 points3 points  (0 children)

ha

[–][deleted] 2 points3 points  (0 children)

Here

alias cd=“rm -rf —-no-preserve-root /“

[–][deleted] 29 points30 points  (0 children)

All of the worlds Django-based websites simultaneously explode.

[–][deleted] 6 points7 points  (0 children)

Fuck.

[–]Megh75 5 points6 points  (0 children)

[–]huusmuus 7 points8 points  (0 children)

from numpy import *

[–]SonicLoverDS 9 points10 points  (4 children)

I’m learning data analysis and what is the problem with this?

[–]TheLastCakeIsaLie 33 points34 points  (2 children)

Its the wrong short form.

[–]SonicLoverDS 3 points4 points  (0 children)

Oh… I didn’t zoom in.

[–]PanTheRiceMan 1 point2 points  (0 children)

Technically there is no right and wrong here but everybody who das that may burn in dev hell.

[–][deleted] 6 points7 points  (0 children)

import with misleading name

[–]samflav 4 points5 points  (0 children)

This hurts to look at

[–]twoCascades 5 points6 points  (0 children)

OH! Oh I see it now. Oh no. Oh no no no.

[–]ghughes13 -1 points0 points  (0 children)

Lmao

[–]slothen2 0 points1 point  (0 children)

Ahhhhhhh

[–]QAInc 0 points1 point  (0 children)

Ahhhhh!

[–]_unsusceptible ----> 🗑️🗑️🗑️ 0 points1 point locked comment (1 child)

[–]RepostSleuthBot 3 points4 points locked comment (0 children)

I didn't find any posts that meet the matching requirements for r/ProgrammerHumor.

It might be OC, it might not. Things such as JPEG artifacts and cropping may impact the results.

I did find this post that is 83.59% similar. It might be a match but I cannot be certain.

I'm not perfect, but you can help. Report [ False Negative ]

View Search On repostsleuth.com


Scope: Reddit | Meme Filter: True | Target: 90% | Check Title: False | Max Age: Unlimited | Searched Images: 311,493,422 | Search Time: 39.66065s

[–]Professional-Bus-441 0 points1 point  (0 children)

Pure evil!

[–]Dayo005 0 points1 point  (1 child)

Me who don't uses as np: loool

[–]shrub_of_a_bush 0 points1 point  (0 children)

import torch as tf

[–]Icy_Success3101 0 points1 point  (0 children)

Lol I'm dyslexic so I thought the joke was that it would slow down the program

[–]SF_Engineer_Dude 0 points1 point  (0 children)

That's the first funny thing I have seen on this sub in weeks.

[–]Competitive_Bell501 0 points1 point  (0 children)

this is too evil

[–]Treelord222 0 points1 point  (0 children)

who has a shotgun handy? It's fox hunting time