Things you hate about Python, I'll start

Things you hate about Python, I'll start.

>It exists

Other urls found in this thread:

fr.wikipedia.org/wiki/Liste_de_sondages_sur_l'élection_présidentielle_française_de_2017'
python.net/~goodger/projects/pycon/2007/idiomatic/handout.html
docs.python.org/2/library/decimal.html
twitter.com/NSFWRedditGif

The fucking syntax. It's so disgusting and wrong.

I'll hack your mother with my python

>building a proto for xorg requires python
>bloat on my computer!!!1

>it's so easy to learn I got a job with it in 5 months
>average salary for it in London is currently £100k being one of the highest for langs here
Seriously, it's too good to exist, that's what I hate about it

Noobs can use it.

>__init__.py / __pycache__ /.pyc

I'm american. Should i move to London and do this?

Average is based off someone with 2 or more years mate.

That being said, you'd probably get a similar salary in Cali. Rent is also high here in London

>no switch
even if they just build one for synaptic sugar, I would be happy

No tail call optimization. Are you fucking kidding?

Libraries lack functionality for primary types.

For example urllib.request doesn't support byte strings as urls, so when you want to request urls with foreign characters you have to use shit like urllib.parse.quote...

Python's syntax is beautiful user.

Use python 3 faggot.

Hate how they do for loops. Haven't had much experience with it, or programming in general but much prefer how Java does it.

I am and it doesn't work faget

Try requesting this url 'fr.wikipedia.org/wiki/Liste_de_sondages_sur_l'élection_présidentielle_française_de_2017'

>Haven't had much experience with it, or programming in general
lmao

>classes
>no switch, have to use a dictionary for trivial bullshit

It has to be coerced into using utf-8 all the way instead of it being the default. What the fuck python.

use python3 you fucking faggot

>EncodeDecodeError
>_________init_________(self):
>forced indentation
>self.sucking
>poorly threading support

desu its the best part of the language. only BASIC can even come close to the beauty

>filename
nice

this. all of the fags ITT never learned how to properly write python and most likely are just poos in the loos writing basic syntax. There's a code by which you write to make your programs pythonic. When you do so, it looks beautiful.

The for syntax takes a while to underatand, no && || ! have to type and or not otherwise python seems comfy so far, granted I'm learning it for just like 3 days

fucking whitespace

Don't skip on list creation. It is incredible useful for creating huge amount of test data etc.

x = ['a','b','c']
y = ['d','e','f']
[i+ii for i in x for ii in y]

>> ['ad', 'ae', 'af', 'bd', 'be', 'bf', 'cd', 'ce', 'cf']

Also don't skip the format stuff. Boring, I know, but it is great for handling hex etc.

how does "and" take more effort to understand than "&&", it's just intuitive

or for i in list:

how simple is that? fucking great is what it is

>for i in x for ii in y
I never knew you could do that I always double nested them.

Then again I never got too deeply into it

El poster kill yourself nigger filth

>synaptic sugar
I hate this phase

>Synaptic sugar
So like drugs...?

no u.

Yeah its super handy for a lot of things. For example here is a mac address generator in one line. Zero effort.

':'.join( ['%02X' % randint(0, 16) for i in range(6)] )

>like
It's a metaphor?
No wonder they fired me.

You can remove the [ ]

how do I make my code pythonic, sempai?

python.net/~goodger/projects/pycon/2007/idiomatic/handout.html

no static typing

made for script kiddies

>2016

Aren't you the guy who also had 10 years of working with C under his belt?

>selselfselfselfselfselfselfselfselfselfselfself
>amazingly shitty to call out to shell commands
>slow
>lambda syntax sucks
>__functions__ like __init__
Ruby is superior in literally every way with only the small blemish that parenthesized function calls cannot have spaces between the function name and the opening parenthesis.

I guessed it helped lel

This pretty much.

Otherwise it's fucking awesome for quickly doing science stuff.

list comprehensions are so cash

It's not Lua

...

I would consider myself an Rubyist, but I can't agree completely..

Ruby is cleaner and more consistent to me (Python feeling more of a toolbox of methods). And boy do I love the functional programming tools you have, you get a lot of good things from Perl and JS without the quirks..

But what I like about Python is that you have a lot more and better libraries as soon as you leave the interwebs. In the Web, Ruby rules, because you have so many amazing frameworks with a metric fuckton of libraries for every kind of problem..
But as soon as you want do math or numeric stuff of even write a decent GUI, you have to code a lot of stuff for yourself (or include C libraries, which is possible, but not convenient), because there are no good solutions here.


I never found the metaprogramming capbilities of Ruby THAT important, but I do love the functional stuff. Unfortunately, the Python founder hates functional programming, otherwise I'd switch to Python.


Long story short: both langauges are pretty similar, both are pretty nice, both have differnt areas where they shine and we shouldn't fight each other.

>__functions__ like __init__
I don't mind python but shit like this just drives me up the wall.

The real answer is to use requests.
The base http libs suck.

Like every other language that doesnt cut off the output

>First of all, not using a ascii only for any URI ever

>do this
btw use latin1 encoding

Is there something like bottle framework for ruby?

it doesn't have arrows or functors

Things you hate about OP, I'll start.
>his mom didn't abort him

>Doesn't have functors

class Accumulator(object):

def __init__(self, n=0):
self.n = n
def __call__(self, x):
self.n += x
return self.n

acc = Accumulator(7)

print(acc(5)) ## 12

I don't know the bottel framework..

But for Ruby there's NanoC (tiny framework for static sites), Rack (an interface for the web, Rails works with Rack) or just very small frameworks like:
-Hobbit
-New York, New York
-Brooklyn
-Scorched
-Cuba
-Nancy

..and probably some more.

What's wrong with __init__?

Because className.init would have made much more sense and would have been far less bullshit to type

So it's a minor niggle at most. I thought you were going to post something profound, and that I was going to learn something today.

Consider your opinion discarded.

The gay semicolon and whitespace shit. C-style or bust.

This. It's not beautiful. It's just dumb.

>the syntax uses indentation
Into the trash it goes

Syntax is so ugly. Pick one for god's sake.

thx

ministry.__len__()

There you go.

Do you know the difference between functions and methods, ayy-non?

Yes I do know this things. But for god's sake you can use both in same code and it fucking werks.

docs.python.org/2/library/decimal.html

...

What's wrong with having two ways to do something, other than upsetting your fragile sensibilities?

>-Hobbit
>-New York, New York
>-Brooklyn
>-Scorched
>-Cuba
>-Nancy
What is up with these names, they sound terrible

Several problems. It makes noobs more into programming, we get horribly written poorly optimized non-functional programs.
It looks ugly too.

you forgot
- Longing
- Rusted
- Seventeen
- Dawn
- Stove
- Nine
- Kind-hearted
- Homecoming
- One
- Freight car

STOOOOOOOOOOPPPPPPPPPP
>>Sup Forums

Things you hate about OP, I'll start

>It exists

would consider ruby but ruby stands alone
python is more system/OS intrinsic

Switch is un-idiomatic. Use a dict of lambdas instead.

>there are so many things wrong with it you could write a LotR-scale trilogy about them

The figure is extremely skewed because python is the preferred language for extremely high-paying scientific applications that require PhDs.

>no pointers
>forced source code formatting
>forced GIL (i.e. garbage performance for anything remotely serious)
>shitty at any popular modern programming paradigm (e.g. OOP, functional, etc.)
>forced transition to 3 (because 2 was really even a bigger garbage) when most major libraries work only on 2 and there are huge differences between the two versions that makes porting code tedious at best
>awful performance, the GC in particular is probably the most horrible part of it

Everything is a pointer.
But yes, that's not a language for performance.

>Everything is a pointer.
You don't know what the fuck you are talking about.

Fucking hell, it actually works. (Is that the advisable way or what??)

lmao I don't even know any more.

This shit works


And it is true. Everything is python is passed by reference

Congratz, you are a fucking idiot. Go and read a proper book like this one and then come back trying to reason what's pointer in Python.

>Indentation and line breaks as syntactic characters
>__init__, __str__, __repr__, __main__ etc. What the fuck
>Methods starting with "_" get treated differently then everything else. To me that's just obscure. I get the feature, but they should have introduced a keyword for that.
>Classes are ridiculous overall. You can tell that it just makes little sense as a concept when you have no type safety.
>Threading, what the fuck, just what the fuck.
>and, not, or instead of &&, !, ||
>No ++
>print just sucks. I don't get the logic or consistency here. Why is there are newline after every print? Why the weird overloading with the %-operator? Makes no fucking sense to me.
>",".join(list_of_strings) what the fuck man
>I just like to mention once again that I'd like to punch the guy who thought that "__main__" was a good idea in the face.
>I hate how everything is returned as reference. I see how it's the easiest way overall, but sometimes it drives me crazy.
>The performance is just so incredibly shitty and it's close to impossible to see whether an abstraction just makes the code prettier or comes at an insane performance penalty. There's just no intuition. See classes.

I mean, of course I still use it, I have to. But it really is not a nice language.

__bullshit_method_names__()

No fucking idea what type a variable is by looking at it

self as an argument for all member methods

No IDE can auto complete it because M I N I M A L I S M

Can't even import a file from one directory up without having to fucking add it to the PATH

Hey guys,

if I would learn Python, should I use python 3 or python 2 ..?

Y-you're welcome..


Ruby is preinstalled on OS X also you can use is as scripting language on linux just fine..

The fact that they still can't get people to migrate from 2 to 3, and that they still pander to 2babbies.

3

I hate how its installed by default on all the distros and so much shit is written with it.

I remeber there for a while most of ubuntu depended on it.

>No IDE can auto complete it because M I N I M A L I S M

>what is PyCharm, etc.

Learn proper file structure and virtualenv management.

The benefits vastly outweigh the cons for me, I really enjoy writing in Python but there are a few things I dislike about the language.

>No tail call optimization because Guido thinks recursion is confusing
>self.foo everywhere
>Constructor syntax is disgusting
>Missing syntactic sugar switch and increment operators (not really a big deal)
>Bad performance

I like indentation for code blocks.

Normally, you have to do brackets/parentheses and you have to indent (purely for aesthetics)

why not just cut out the brackets/parentheses? that way you get your syntax element and your aesthetics in one "device"

Also you get used to it in no time. And syntax is just syntax who the fuck cares.

> python 2

I shiggy diggy

Also what you are doing when you call "len()" is calling a function as if it was defined outside of a class. The len() function happens to have 1 argument. When you call ministry.upper() you are calling a method of an object that happens to have no arguments.

It's perfectly consistent.

why would you ever want to use _tail_ recursion in Python?

Retard.

You wouldn't obviously, because it doesn't have tail call optimization.
If it had tail call optimization, you'd want to use tail recursion to reuse stack frames.