|
do do-do do do-do do
Real programmers use butterflies
|
|
|
|
|
honey the codewitch wrote: my gender is bees. Reading your single-line if-statements certainly stings
|
|
|
|
|
Henceforth I shall use "it", or maybe "they / them"!
|
|
|
|
|
I had you down as "badger" - go figure...
So old that I did my first coding in octal via switches on a DEC PDP 8
|
|
|
|
|
|
Although we aren't italians (but close enough being spanish) that would be true for my oldest brother... he loves it.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Mamma mia, Mortadella !
|
|
|
|
|
|
Those are Police blood cells, aren't they?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
No, not mine.
My father ones, possibly.
My sons ones, for sure.
Well, all my relatives ones are the like...
Oh wait...
|
|
|
|
|
THis is my rant on Python as I'm helping someone learn it for use in ML.
Did you know that a Python variable declared in the .py file is global to that file?
For example:
def printGlobal():
print(str(extra))
extra = 35
printGlobal()
extra = "Python are stupid."
class Arsinine:
def __init__(self):
print(extra)
a = Arsinine()
Imagine if that .py file grew to be even just long enough to be off the screen. You might do something else with the extra variable and create odd issues since it is global.
Or, if there is more than one dev working on the code.
It's quite terrible.
Objects are for the express point of encapsulation, but you don't get that here.
I know, the class should be created in another file and all that.
843 People Upvoted this Comment
I do not know what kind of mind created this language and why you would want everything on the global scope like that. But here is a snapshot of comment from SO who are are chiming in that globals are not dangerous...
*Are these people devs[^]? Do they understand anything?
I guess they've all been fortunate enough to only work on their own code.
Yes, yes, anything can be used properly or improperly, but this makes it a bit difficult to use it properly. Probably proof that Python is a kiddie language that isn't concerned about creating larger programs. (I'm expecting to receive the fire after that comment.)
*Comment from first answer at: python - Using global variables in a function - Stack Overflow[^]
|
|
|
|
|
raddevus wrote: 843 People Upvoted this Comment 844 now.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
I think that's what they call "soft trolling".
|
|
|
|
|
soft?
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
If you compare it to Eddy Vluggen's trolling, I think you'll agree that it's soft.
|
|
|
|
|
You are evil
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
ZurdoDev wrote: 844 now.
I'm putting you in a special box.
[ ZurdoDev ]
Ok, just glad to know where you are.
|
|
|
|
|
raddevus wrote: I'm putting you in a special box. As well you should. My momma says I'm special.
But in seriousness, there are times when globals make sense. That's all the comment was saying, I believe.
Social Media - A platform that makes it easier for the crazies to find each other.
Everyone is born right handed. Only the strongest overcome it.
Fight for left-handed rights and hand equality.
|
|
|
|
|
ZurdoDev wrote: But in seriousness, there are times when globals make sense. Agree...
But if python really behaves as raddevus is saying, then it is a bit odd and might give problems faster than in other languages regarding to this topic
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
No, but also injection is a kind of global behavior in the broadest sense
It does not solve my Problem, but it answers my question
modified 19-Jan-21 21:04pm.
|
|
|
|
|
0x01AA wrote: No
Good, I will continue talking to you then.
0x01AA wrote: but also injection is a kind of global behavior in the broadest sense
Ok,I might concede on that point. However, writing the code to do injection is far more extensive than just writing:
extra = "i am global"
Barriers to entry are necessary.
Imagine if anyone could just flip a switch and turn off gravity!?!
Oh, man, you'd never get any work done because your keyboard would keep floating into the clouds.
|
|
|
|
|
Global constants, yes.
Global variables, no.
|
|
|
|
|
Greg Utas wrote: Global constants, yes.
Global variables, no.
Ah, great point! +5 points for the Globals.
|
|
|
|
|
Global variables being defined by you... still might be ok.
Every variable being global in the whole file / "class" where they are defined without you making it on purpose... is looking for problems.
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
modified 26-Jun-20 19:55pm.
|
|
|
|
|
Nelek wrote: Global variables being defined by you...still might be ok. Am I really that much of a paragon?
|
|
|
|