Python is the best programming lenguage

Python is the best programming lenguage
>prove me wrong
protip: you can't

Other urls found in this thread:

jakevdp.github.io/blog/2014/05/09/why-python-is-slow/
wiki.archlinux.org/index.php/python
wiki.ubuntu.com/Python/3
twitter.com/NSFWRedditGif

Python 2 or python 3?

dynamic typing isn't cool

3

>Global Interpreter Lock

python is comfy... but "the test" is just too broad

Python 2 is the legacy version Python 3 is just Python with no extra features I think

If it wasn't for unicode shit it would be

>He doesn't know about Perl

what is so good about perl?

10 PRINT"OP is a faggot";
20 GOTO 10

jakevdp.github.io/blog/2014/05/09/why-python-is-slow/

tl;dr

Better than Python pretty much all across the board.
Python recently unseated it by being more Pajeet friendly.
Perl was the de facto scripting language for a long time.

bu-but i love semicolons

read the first topic you faggot

>prove me wrong
Go exists.

Now fuck off.

That's not an answer. You just rephrased your first statement and added python is more Pajeet friendly.

I think you mean Python and C/C++ are the best programming languages. Can do just about anything with them.

This. All these hipster languages don't seem to get that static typing exists for a reason.

Perl is good but it's finicky as fuck

There's every feature and the kitchen sink, so it's easier to tell the interpreter to do ... pretty much anything you could want to do.
But because of that there's more to learn, making it less Pajeet friendly. Also the code is uglier, making it less Pajeet friendly.

On the other hand, Perl is implemented better than Python.
Among other things, this means Perl code runs faster than Python code.

This

Make a list that has a list inside.
Go ahead, I'll wait.

Python could run as an interface for almost any language.

It will win at the end for sure, beating matlab java C# and all that shit.

PRINT"OP is not proper command. Fag.

Enforced whitespace reeeeeee. Die Python die.

Give me python with optional static typing and mandatory variable declarations and together with C-like languages it's unbeatable.

indentation sucks.
OO features feel like an after-thought.

I thought that a lot as well, but it's not like you wouldn't indent blocks in other languages with whitespace as well....

Ignoring how fucking ugly it is, the devs are just morons and completely negligent. I have to manually link /usr/bin/python to python2 or python3 depending on whether or not some script I want to run expects a specific version because the fucking monkey python devs were too fucking stupid to avoid breakage AND provide explicit guidelines for dealing with breakage.

Instead, they decided to break everything and let the end user deal with it. Python is garbage and deserves to burn.

But Python's indentation is very finicky for no gain, and it is enforced. A combination from hell. If you enforce indentation, at least make it flexible instead of being OCD-tier.

>I have to manually link /usr/bin/python to python2 or python3 depending on whether or not some script I want to run expects a specific version
No you don't.
If the script has a #!/usr/bin/python, it's 2. If it's python3, then it runs 3.
If you're manually running 'python program.py' then you use python for python 2, python3 for 3.

In what way is it OCD?
The gain of it is that you don't explicitly need brackets then. "Don't repeat yourself" is a cornerstone of python.

There is no best and there probably is no worst (despite how hard malbolge tries).

Please stop the language wars.

The symlink for /usr/bin/python is set by your OS. Its not mandated by the stupid Python devs. So one OS might have it point to Python3, another might have it point to Python2. Again, because of the stupid fucking python devs.

>The symlink for /usr/bin/python is set by your OS
Yes, to whatever your latest version of python 2 is (or to the python2 symlink).
Name one major OS that links /usr/bin/python to python3. Oh wait, they don't because it would break the scripts that make those OSes work to begin with.

Is there a reason why Python isn't backwards compatible?

>ended with a semicolon in a Python discussion

Kys
Whitespace isn't a meme, you'd do it in other languages too

show the benchmarks fag

url = 'Sup Forums.org/g/'

base_url = re.match(r'\bhttps?://[^/]+', url).group(0)
resp = urllib2.urlopen(url)
soup = BeautifulSoup(resp, "html.parser")
for link in soup.find_all('link', href=True):
cssPath = str(link['href'])
print base_url + cssPath
cssFilename = re.match(r'\w+', cssPath)
print cssFilename

This returns absolutely nothing and I have no idea why? I am only trying to scrape off the filename for the CSS file but for some reason it doesn't even want to match a word.

I've confirmed with pycharm that cssPath is a valid string which contains data but for some reason beknown to me it doesn't want to match anything. Can anyone tell me why?

wiki.archlinux.org/index.php/python

>inb4 ARCH HURF DURF
Originally, 2015 was the date that /usr/bin/python would point to python3 for pretty much everyone (Debian, Ubuntu, etc). Because the situation was so fucked, this has been pushed forward to 2020. But the goal is still to eventually have it point to python3.

wiki.ubuntu.com/Python/3

Because the python devs are idiots. If you are going to destroy backwards compatibility in a language, CALL IT SOMETHING ELSE

>not knowing the rules of semantic versioning
Chrome has really fucked you up son.

What a mindfuck?

>'Sup Forums.org/g/'
lold

It's just an example, the webpage I'm actually trying to parse is over 240 characters long

fix your regular expression.
Something like
cssMatch = re.search(r'/([\w-]+\.css)', cssPath)
if cssMatch:
print(cssMatch.group(1))


might have to edit the regular expression to include more things.

Python's brilliant for scientific computing. We've started to replace our codebase with Python scripts and ditched our IDL shit. NASA and other large organisations are funding some of the development of numpy/matplotlib. Glorious future is ahead.

It makes writing code into the repl unnecessarily painful

Could you please tell me what was wrong with it currently? Because the method I used worked for pulling the title?

I was beginning to think it was related to unicode or ascii or whatever shite

From your own link:
>What this does not mean:
>/usr/bin/python will point to Python 3
>No, this is not going to happen
>/usr/bin/python and /usr/bin/python2 will point to Python 2.7
Arch is a toy OS. Anything actually used in production like Debian/Ubuntu or RHEL/Centos doesn't do that.

>slow as fuck interpreted language is the best language
>"prove me wrong"

First of all it's called "langauge", not "lenguage"

Also I whish I could smack every guy who uses this "langauge x is better than language y" baiting..

Langauges are always TOOL for aa specific PURPOSE.

Is a hammer is better then a saw?
Is a car is better than a boat?
Is hex better than binary?

Even if we look at so called "scripting languages" (where nobody can actually define what they are), python is good for specific tasks while at other tasks other languages have advantages.

Perl and Python are so very differnt, it's silly to even compare them.

In Perl there's like a million ways of doing things (and serisouly no Perl programmer knows all of that language), in Python there's exactly one way to do it.

So while Perl is one of the craziest and hackiest languages out there, many Perl guys switched to Python (or Ruby) because they are simpler to learn and about as powerfull.

It's pretty senseless to make this a "dick contest" because each of those langauges has stuff where it's absolutely fucking brilliant and other stuff where it's.. OK.

To put it like this:

>Python is like C: not much syntax, no dicking arround, just straight to the point
>Perl is like C++: incredibly powerfull but also a big, REALLY big language with amazing stuff and wierd stuff
>Ruby is like C#, a modern version of C++ with a lot of cool ideas and shiny bling-bling, although some people might not like it

they're all pretty good dude

re.match matches from the beginning of the string so "/ui/css/s1jobs-master.css" will not match \w+, which is why you use search to search the string for the match.
You want to match "s1jobs-master.css"
so \w means [a-zA-Z0-9_], but will not match - so you use [\w-], you can include more characters if you need to match additional characters. I also add \. to match the . for css, then to just match the literal css.

Thank you so much, I can remember reading this in the docs a few months ago but I obviously skimmed this earlier

no problem, probably better to learn regular expressions in general because it pretty much shared by all implementations.

Hello fellow anons and OP, can you help with a python program, it's supposed to do some things like facebook :)

Indentation alignment, tab vs space. Especially when you alter code, it's easy to mess up the correct (i.e. the only right way) indentation.

>Kys
Go tell that to your mother, kid.

Post the issue or join us on /dpt/

>Indentation alignment
How so?
>Especially when you alter code, it's easy to mess up the correct (i.e. the only right way) indentation
Still not sure what you mean by this, unless you have your editor misconfigured in which case it's a PEBKAC.
If you go strictly off pep8, you indent with 4 spaces only, and use whatever number of spaces necessary for alignment. Pretty hard to mess it up.