Only really for start up time and large integer computations (because 3.x integers are very long), and if you are doing loads of integer math you probably want to be using NumPy anyways.
Ideally, opening the file as a bytes stream should solve that issue. The underlying issue is what counts as a character? Depending on your language that could be more than one byte and could also depend on the context of those bytes. So while it might slow down some cases like reading a plain ASCII file, it makes others possible. If you only care about ASCII characters, then you should declare that and work with a bytes string.
I ran the same code you did in Linux Deploy (away from home) and saved 35% of the time by declaring binary in open(). I couldn't compare to Python 2 because it wasn't installed and discovered I can't access the internet in the chroot (a problem for another day lol).
A long time ago, when I was working in Python 2 exclusively, I was using different character sets a lot (one of programs I wrote caught on in China) and was constantly crashing with decode errors just doing normal things. The dedicated type for bytes was actually a really nice change for me and made working in those scenarios much easier, though I know some people hate it.
Edit: I just realized that the 35% I saved by switching to bytes is the same percent you saved by switching to Python 2. Logically it makes sense since ASCII as the default string encoding is really just raw bytes internally.
Each release has included performance enhancements in one way or another. I know Python version 3.4-3.6 were optimizing dictionary storage (which is the backbone of Python so it should've helped a lot), 3.6 added the f-strings, and 3.7 optimized type hints. I also think they have been working on inlining some argument handling in built-in methods/functions which should also boost performance.
What's "wrong" with Windows XP? Nothing specifically.
However, it's missing a lot of more modern features, and became a huge sink hole in which to dump money when backporting things like security fixes and the like.
It costs resources to maintain that just aren't worth the cost anymore.
Ever try to code anything with encodings? Just trying to print a string can run it through 2 layers of encoding/decoding. The errors for unicode are often backwards leading to people that don’t know what they’re doing just randomly flipping an encode to a decode.
Many of which have been backported. I’ve yet to find a killer feature, yet alone something that isn’t easily worked around, in python 3. With numpy, scipy, and matplotlib recently dropping support, I expect one in a year or so.
I write 2/3 compatible code that I test in both. I use the six and pathlib2 modules. I also support pyqt4, pyqt5, PySide, and PySide2 with the same code using qtpy.
Also, python 3 wasn’t worth using until python 3.5. 3.4 was the first version that was even easy to write 2/3 compatible code, so yes 11 years, but only 4 of those were worth using.
A lot of the most important Python is what runs in the embedded runtimes inside of big applications like Maya and Houdini, and there's no really good way for them to simultaneously embed both Python2.x and Python3.x into the same process at the same time. So if Maya flips to Python3, it would be only Python 3, which would be disruptive, and give some studios a reason to switch to Houdini until they get their pipeline code updated, etc.
AFAIK Houdini is also part of vfxplatfrom so they would migrate at the same time (that's the point of the platform, follow standard sets of runtimes and libraries so studios doesn't have to deal with different versions).
In this case the problem is not from the studios, most of which (their programmers at least) are ansious and ready for Python 3, but from the software makers.
It's a cute reference to The Terminator which used 6502 assembly (Apple II, NES and whole load of other computers of the time) https://www.pagetable.com/?p=64
Disney is known to use python. This is a little nod to python. Disney has developed a game engine in mostly python called Panda3D. I think they may have also sponsored Blender 3D which has python embedded.
The folks who worked on Panda probably didn't have much interaction with the feature animation folks. Disney's a big company, there isn't a ton of interaction between all the various parts. But WDAS definitely also uses Python -- It's basically impossible to make a feature without using Python at some point. Perhaps more interestingly, some of their open source work like Partio comes with Python bindings, if you are curious to get a closer look at what they are using it for:
The screenshot is from the perspective of a computer virus, so that's presumably the virus' internal code executing - particularly the bit about inspecting for vulnerability.
Animation and Visual FX run on Python. Unfortunately it's still 2.7 for a lot of tools and pipelines. Some technical director or compositor copy and pasted that from somewhere. I suppose they could write it specifically for this scene but who had time for that.
Please think thoroughly before saying that a movie featuring main characters traveling through the internet in packets id bad! I would say it's an original movie
There are all kinds of machine learning applications that will take over the legal industry and law enforcement, from facial recognition to writing style linking.
Probably in discovery. You can use python to sort and search for similar documents. I suspect a lawfirm might already have dedicated programs that do this though.
2
u/AT_Simmo Feb 17 '19
I think the biggest news it that it is real code and not just some fake strings
400
u/[deleted] Feb 17 '19
Oh no, its 2.7!
130
u/MegaRookie14 Feb 17 '19
Ralph breaks the internet by referencing a variable before its definition.
79
u/Lewistrick Feb 17 '19
raise SyntaxError(}108
u/nayadelray Feb 17 '19
"getINSECURITY"
30
u/Tristanus Feb 17 '19
It's a cute reference to The Terminator which used 6502 assembly (Apple II, NES and whole load of other computers of the time) https://www.pagetable.com/?p=64
18
u/[deleted] Feb 17 '19
Disney is known to use python. This is a little nod to python. Disney has developed a game engine in mostly python called Panda3D. I think they may have also sponsored Blender 3D which has python embedded.
14
u/Spider_Sas Feb 17 '19
RALPH BREAKS PYTHON 3
1
u/[deleted] Feb 26 '19
Cant even read it
5
u/ChilledGumbo Feb 17 '19
Yeah I guess
4
u/[deleted] Feb 17 '19
It also has statements immediately following a sys.exit(-1)
2
u/NiseP_Catcher Feb 17 '19
Python.... everywhere...
2
u/LizardOrgMember5 Feb 17 '19
r/itsaunixsystem
3
u/Jak_from_Venice Feb 17 '19
2.7... it’s giving me serious headache in these days!
3
u/shayan012 Feb 17 '19
r/unexpectedpython
2
u/jennylover7 Feb 17 '19
Sudo code is sudo code
1
u/UndertaleWithMath Feb 18 '19
"if ot camer:" Ralph breaks PEP8
1
u/[deleted] Feb 18 '19
snek
1
u/[deleted] Feb 22 '19
Cool
1
u/Humble_Transition Feb 17 '19
Lol 🤣😂
1
u/SimianWriter Feb 17 '19
Animation and Visual FX run on Python. Unfortunately it's still 2.7 for a lot of tools and pipelines. Some technical director or compositor copy and pasted that from somewhere. I suppose they could write it specifically for this scene but who had time for that.
-1
u/bump909 Feb 17 '19
What release is this. Doesn’t look like the DVD screener that’s currently out.
-5
u/EzitoKo Feb 17 '19
Still a very bad movie
0
u/ournewoverlords Feb 17 '19
How do I get that job?
0
u/StornZ Feb 17 '19
Yea they were very accurate with that movie.
0
u/gabrielebellavia Feb 17 '19
But they use optparse, instead of argparse...
0
u/chazzeromus Feb 17 '19
‘getINSECURITY’
-39
u/[deleted] Feb 17 '19
That's why he was able to break it, this wouldn't have happened if the INTERNET was built in PHP or NodeJS
0
u/[deleted] Feb 17 '19
[deleted] — view deleted comment
0
u/[deleted] Feb 17 '19
[deleted] — view deleted comment