[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
>Try to learn Python for some general scripting and webscraping
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 68
Thread images: 3
File: 1459221421687.png (8 KB, 244x206) Image search: [Google]
1459221421687.png
8 KB, 244x206
>Try to learn Python for some general scripting and webscraping bullshit after learning C
>Can't make any fucking sense of it or its differences from actual, normal languages

REEEEEEEE WHAT THE FUCK IS "__NAME__" SUPPOSE TO MEAN? WHAT THE FUCK?

WHAT IS "SELF" SUPPOSE TO MEAN? REEEEEEE

Why is documentation so fucked and why is there so many retarded kinks? People say C is a messed up language but at least it's fucking intuitive...
>>
>>53744090
Here is your reply and your (You)

Happy now
>>
>>53744178
I don't want a (you). I just want an explanation.

Why is this fucking language such a clusterfuck?
>>
This guy needs more (You)'s
>>
>>53744090
$ python
Python 2.7.10 (default, Dec 10 2015, 00:00:00)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print __name__
__main__

wow, so difficult
>>
lol @ python babbies getting defensive about their babby simplified language in this thread
>>
>>53744265
No but I mean what's with the weird style of __SHIT__?

Looks weird as fuck
>>
__name__ is a global variable that contains the name the module was called with.

self is a reference to the current object, just like "this" in C++/Java/C#

You candelete this thread now
>>
>>53744289
OK what is __init__.py then, smart ass?
>>
>>53744090
import faggot
print python is for faggots
>>
>>53744265
how do u guys type like that? are you hackers? teach me pls>>53744329
>>
>>53744374
A special file used to tell Python to treat a whole directory as a package

Next stupid question that can be answered with a 5 second google?
>>
>>53744408
Why is there no good tutorials or documentation on Mechanize?
>>
>>53744436
Because there are fsr better languages for automate web testing
>>
>>53744324
the entry point to you python module.
>>
desu op, python is a shit lang.

you're better off with something more useful and better designed like javascript
>>
>>53744345
You do it like this
>>
>>53744345
 tag senpai.
>>
>>53744455
Such as?
>>
>>53744503
oh lol... nvm. read the rules faggot

https://www.4chan.org/rules#g
>>
Python is an experiment in how you can get people to idolize something sloppily hacked together if you make it easy enough to use.
>>
>>53744486
b8
>>
>>53744533
Its apparently not easy enough for OP
>>
>>53744587
Some things can be "easy" but syntactically be weird and hard to understand once you learn a certain way.
>>
>>53744571
ya so b8.

not like async is literally ez mode concurrency.

like it's such a good idea to literally include everything into the standard lib.

ya.

fuck off pythonista faggot.
>>
>>53744599
Python lacks any real theoretical platform, which is ultimately the problem with languages defined by an implementation and not a documented standard. It is ultimately a reflection of the project lead's arbitrary whims.
>>
>>53744285
It's so you don't fuck up. If it was just main instead of __main__ there would be overlap and stuff. Do some research and use Google. Fucking node.js kids
>>
http://lmgtfy.com/?q=python+double+underscore
http://lmgtfy.com/?q=self+python
>>
I picked out a random part of the python documentation and it was at an 11th grade reading level, so I can see why you'd have difficulty.
>>
Holy shit, I'm not a fan of Python but even I know how it goddamn works and admit it's nice for quick scripting as long as you don't learn it as your first language because it causes bad habits/makes it harder to learn other languages.
>>
File: EjJopdb.jpg (18 KB, 600x600) Image search: [Google]
EjJopdb.jpg
18 KB, 600x600
>>53744486
Try harder
>>
>>53744519
[cawk]I can hax![/cawk]

didn't work:/
Also, troll thread, into >>>/trash/ it goes.
>>
>>53745416
I learned it first and I was pretty eager to learn other languages because its sheer simplicity is limiting. No low level access, no advanced abstraction that isn't object fuckery.
>>
>>53744090

from faggotry import op

print "WAAAAH I DON'T KNOW HOW TO USE FUCKING GOOGLE"
>>
>>53744329
$ python
Python 2.7.11 (default, Mar 3 2016, 11:00:04)
[GCC 5.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import faggot
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named faggot
>>> print python is for faggots
File "<stdin>", line 1
print python is for faggots
^
SyntaxError: invalid syntax


HAI GUISE HOW DO I RAN PROGRAM
>>
Never got into Python either coming from c++.

The indentation thing is weird, platform dependent and which fucking version do I use?
>>
>>53745690
>platform dependant
what

>which fucking version do I use
Python 3
>>
>>53745690
>which fucking version do I use?

That argument is even more intense than winfags and macfags duking it out in a blatant display of utter FAIL.
>>
>>53744202
>>53744090

it's not, it's pretty simple actually. Read "dive into python3", that's one of the best books i can recommend if you already "know" C.
>>
>>53744289
They use double underscore to avoid clashing with your own names for methods in classes and variables.
>>
>>53744090
there's a good number of naming conventions, but that's just a product of the community
>>
>>53745742
>"know" C.
You say that as if it's hard to understand C or something.
>>
>>53744090
>c
>intuitive
>>
>>53744090
>People say C is a messed up language but at least it's fucking intuitive
in CS 200, maybe
>>
>>53744285
__stuff__ is for interal-ish methods.
Like when you do a+b, what it actually tries to do (simplified) is a.__add__(b).
>>
>want to learn Python
>can't decide whether to learn 2 or 3
>give up
>>
>>53746186
Learn 3

2.7 just exists for legacy code reasons
>>
dependencies are a nightmare. fuck yourself.

syntax is an arbitrary retarded rollercoaster

python 2 vs 3 for eight goddamn years now

insulated, immature, arrogant and ignorant community can't stand one bit of criticism and think they know better than everyone else even though their platform is the most fragile, slow, confused clusterfuck ever.
>>
>>53744090

Congrats, you fell for the Python meme.

It's a fucking nightmare of a language.
>dat whitespace enforcement
>dat dynamic PHP-like typing
>dat non-speed
>not good for web development, not good for save applications
>science dudes still think it's the future until they leave university

Also you would assume v2 is a subset of v3, right? Just like in every sane language.

But not for the special Python snowflakes..

Or look at this shit:
true = 0


'nough said.
>>
When you have been programming for a long time you stop questioning things link synthax or paradigm. Just makes sure your tests and profiling are diamon-solid.
>>
>>53744090
I am taking my second Python course for my information systems degree and 6 months into studying this shit I still don't get it.
Learned Spanish to a conversational level in half that time.
Python is very picky, while easy (in theory), it is picky.
>>
>>53745714
Well,
Python 3 is the current version, did you consider
most of the code written in python until last year is in Python FUCKING 2!~~~~~~~~
>>
>>53744090
>"__NAME__"


Underrated fault. I would have expected this to come up twice as much as the whitespace shitposting.
>>
>>53744486

> "3" + 2 == "32"
> "3" - 2 == 1
>>
>>53745216
This. Also - and in consequence, it lacks a good implementation.
>>
>>53747468
The keyword is "True" in Python. Try again, faggot.
>>
>Snake fags
>>
>>53744324
A true retard
>>
>>53744509
Assembly x86
>>
>>53744345
Start line with four spaces
>>
def sexualOrientationDetector():
u = "faggot"
return u


print "everyone in this thread is a " + sexualOrientationDetector()
>>
>>53747874
This.

Been programming for 11 years. Did jobs in C++ and 1 in Python (+Django). Did C for personal projects, there are few jobs for it anyway. There has been nothing wrong with Python in large-scale applications, you do miss static typing in places, but in other places, you're grateful that its dynamic nature can improve scalability without sacrificing clarity
>>
>C
>intuitive

If you think C is intuitive you've never written or read any real C code, m8. C is batshit insane and it's only kept alive due to its ubiquity. It, C++, Perl, PHP, and many other archaic languages need to be put out of their misery once and for all, so they can spend the rest of eternity rotting in the bowels of hell.
>>
 print("lel i know python")
>>
>>53744519

First time in 4 years that I have actually seen anyone link to the rules. A day to remember.
>>
File: meme_magic.png (324 KB, 800x800) Image search: [Google]
meme_magic.png
324 KB, 800x800
>>53744090
After several months of programming in C++ and Java I have to say that python is pure joy. Its like you are resting while working. Finally you can focus on problem not on language. Comfy syntax makes it even more pleasurable to read other people code.

Ofc there is not one best language, but python is one of the comfiest.
>>
>>53755020
True, whenever I code in python literally 90% of the stuff I try to do just works instead of bitching about syntax shit
>>
>>53744090
IT'S LIKE THE FACE INSIDE IS RIGHT
Thread replies: 68
Thread images: 3

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.