Say something good and bad about Python

...

Programming is for aspies.
It's shit.

Easy to use
psuedo code though

>meme language
>shitty ecosystem and tooling

Python is garbage

Quicker to write.
Not as efficient.

Its a nice language for automating tasks
Its support for multi threading is garbage

W H I T E S P A C E sensitive

Ffs eliminate it already

The GIL was a mistake and everyone knows it.

good:
easy to learn
bad:
no do...while loop

I'll be curious to know how they ever go about removing it.

Good: It helps identify the bad programmers.
Bad: It's a bad programming language.

Good: so many packages
Bad: dynamic typing

Good: it's not as fucking garbage as it could be
Bad: it's still fucking garbage

Good: Quick to write prototype/automation scripts.
Bad: Inefficient and unsuitable for large tasks.

>Quick to write prototype/automation scripts.

Not unique to python.

Good: great for interviewing
Bad: it's Python

You were supposed to say something bad about it too.

Good for prototyping or writing a quick script
I personally dislike the indent-based syntax, but that's arguably good for readability.
Bad thing is probably performance.

What a very bad thing O my god
This

We need to think about the fact that it's high level anyway so things like not efficient aren't really relevant
Good :
A lot of library, not going to dissappear soon
Bad :
Multi threading is shit

Good: Not Java
Bad: Not C

Bad
Not cpp*

I can create opencv scripts for on the fly AR shit in a few hundred lines of code. And still be perormant.


Con
Sup Forums's autism about python for or against it.

What is Cython?

Easy to write and learn.

Pretty slow.

Not python

many built in QoL features like iteration for lists and dicts etc

need too high of an iq to appreciate

+ easy
- bad syntax and slow

Better than having to write C python modules by hand. And you can still call C standard libraries from within Cython

Yea but it's not python. It's something that can be used by Python, and it has things that make it similar / inter-operate well in Python, but it's a wholly different language from Python or C

Other languages have one way to denote structure to the computer and another way for humans. Python efficiently uses one for both.
>somehow to brainlets this is a bad thing

Mmhmm. Which bolsters the python development environment. 80/20

So is it worth it? Why not just use C for that?

It's the easiest / most sane language to use in scenarios where network I/O is the bottleneck (web backends) or when computational efficiency just ceases to matter for the task(generally this is the case)

Sonic-fags on Sup Forums will throw shade on you for using it

>where network I/O is the bottleneck (web backends)
Maybe if you're serving static pages or your content has incredible amounts of bloat

Super flexible while still being easy to write and read, loads of powerful modules to import that just werk
Multithreading and performance is almost non-existent

>import multithreading
It's that fucking easy. The word you are looking for is multiprocessing. FWIW you can just McImport that too. Haha. Noobs

You got it reverse, pal. Python enforces whitespace usage in a rigid format. It's literally communism.

you can actually use joblib or it's approach.
also asyncio
also celery or similar for web
not that bad

i know GIL sucks but there is a project where a dude is working on removing GIL from python
if it gets a lil bit famous maybe 4.x can get rid of GIL

Its something that is ONLY used by python. Just like saying JNI isn't java or in the scope of what one would called "Java"

Cython lets you use python language without having to ALOT of boilerplate. If you look into it cursorily they'll show examples o fusing pure C and Cython. You can do pretty much anything in Cython that you can in C while still using some streamlined language constructs of python.

Generally you only build out your most computationally heavy code in Cython and call it within Python (Think numpy). If you know about the 80/20 rule, then only about 20% of your code would need to be refactored to achieve performant optimization of the 80% of the latency in the code. Just a rule of thumb, so to speak, however.

The colours man.
I fucking love the colours.

It's also great for sketching up a program before making a proper Version

It's also really shit at running finished products.

>Pretty slow.
If speed is required you are supposed to extend python with C modules.

python is fast as fuck
if your code is slow you dont know how to write it right

And to continue this only applies to computational boundaries not memory or I/O bound. Those also require other ways to think about the problem like async.

Shits itself due to lack of backwards compatibility forcing you to have both the "old" and "new" versions.

I'm talking to you 2.x and 3.x

Make me a python program that finds primes faster than C or Java. Protip: you can't

Its easy to use and requires minimum development time, and has the most intuitive and easy to learn syntax imo, and all the available modules and libraries are a big plus

But it's slow as sin. And there's another language more suited for basically every need. Python is a good first language and good for quick testing, but otherwise meh

You are objectively wrong.
I shouldn't even have to explain why a compiled program is faster than a program which has to read line by line each time it runs.

Not shitting on python, it's great..... But speed is not it's purpose.

Source: I use python to create mock-up 3D seismic images of sub surface objects.....

easy to learn, requires python to be installed to use making distribution a real java of a time.

Then why does GNUplot absolutely rape matplotlib, when it comes to performance?

He never said Python is faster than a compiled program though.
He said that Python is fast. While I don't entirely agree, it is often fast enough.

>Vispy

cherry picking is a shitty way to compare things.

Fair point. I ceceed.

Its a fantastic language and modern.

bad: I got nothing.

async only works when you split your code in small chunks (green threading) for the sake of making it work you have to re-structure your whole project, yea... no.

What you're saying is not instructive. Of course computationally heavy loops requrire much fewer yields as per something like a daemon which would require much more yields from nested async frameworks.

So whats your point? Computational complexity usually lies in deeply nested loops that are deterministic and must be completed in a fashion that async'ing wouldn't make sense. Ie the actual implementation of SHA1/256/etc.

>async sha256
that's exactly the shit that will happen then. thx for the laugh

good:

whitespace

bad:

Horizontally scaling simple single-threaded process > mutlithreaded code.

In most cases, exceptions exist.

>Horizontally scaling simple single-threaded process
What does that mean?

Good: It's very simplistic
Bad: It's very simplistic

Right. So in the argument of "Is Python a good language", Cython falls under "things that can be used to improve your Python program", and not quite under "things that you can do with Python".

But yes, Cython is cool. And then there's shit like CuPy

A good example is the scikit-learn implementations of algorithms. Surprisingly readable (once you get the hang of keeping track of the million optional arguments they pass around)

Good: Python
Bad: Jython

Multiprocessing is not an substitute for true concurrently running threads. The fact that there are multiple processes running introduces a whole new set of issues once you get really large programs running, which wouldn't occur if you could use a single process and multiple threads. Passing data efficiently is a pain.

difflib fuzzy comparison is magic

Yeah, it's not the greatest thing ever but it gets the job done. I use it quite often and once you get used to it, it becomes routine. For the first guy to claim multi-threading and multi-processing is "almost nonexistent" is a bit much. It is very much existent. Just a bit of a pain. At first.