← Home ← Back to /g/

Thread 106407547

24 posts 10 images /g/
Anonymous No.106407547 >>106407563 >>106407572 >>106407575 >>106407590 >>106408093 >>106408215 >>106409494 >>106409532 >>106409709 >>106413693 >>106415646 >>106415677
>functions
>dictionaries
>classes
>lists/tuples
>data types

That's it? I mean, as far as basics is concerned, that's all? I can move on to slightly more advanced concepts after I learn these?
Anonymous No.106407563
>>106407547 (OP)
Yea, pretty much.
Comprehensions are also worth a look if you're going to be messing with a lot of list stuff.
Anonymous No.106407572
>>106407547 (OP)
>>>/g/sqt with you
Anonymous No.106407575 >>106407623 >>106409588 >>106410122
>>106407547 (OP)
you don't even need classes
they're bloat
get rid of them
Anonymous No.106407590
>>106407547 (OP)
welcome to functional programming, its a blast :)
Anonymous No.106407623 >>106409588
>>106407575
OOP stuff can be useful from time to time, but I agree that it's often overused for no good reason.
Anonymous No.106408093 >>106408248
>>106407547 (OP)
>Python
>C code in background
What pajeet made this thumbnail?
Anonymous No.106408215
>>106407547 (OP)
>functions
>data types
That's it. Just stop there. You're done.
You've won the game already.
Anonymous No.106408248 >>106408257 >>106410300 >>106410413 >>106410437
>>106408093
If we really want to grasp at straws(and I could be wrong) isn't the main implementation of Python CPython written in C?
And all the real hardcore Pythonistas get down and dirty to optimize their very slow code by fucking around at the lower level with C when it actually matters?
(I don't actually know and it's a stupid picture)
Anonymous No.106408257
>>106408248
>And all the real hardcore Pythonistas get down and dirty to optimize their very slow code by fucking around at the lower level with C
lmao
Anonymous No.106409494
>>106407547 (OP)
>PyShitClusterfuck
>Advanced

HAHAHAHAHAHAHA
Anonymous No.106409532
>>106407547 (OP)
Those are some of the fundamental building blocks of many programming languages, but they aren't the complete picture for a solid foundation. While mastering functions, dictionaries, classes, lists/tuples, and data types is a great start, there are other essential concepts you should learn before moving on to more advanced topics.

What You've Got
(omitted)

What to Learn Next

To have a well-rounded understanding of the basics, you should also grasp these concepts.

Control Flow: This dictates the order in which your code is executed. Essential concepts include:

Conditional Statements: if, elif, and else statements allow your program to make decisions based on certain conditions.

Loops: for and while loops let you repeat a block of code multiple times. This is crucial for iterating over collections of data.

Error Handling (Exceptions): Things will go wrong in your codeβ€”it's inevitable. Learning how to use try, except, and finally blocks to handle errors gracefully is vital for building robust programs.

Modules and Libraries: Understanding how to import and use code written by others is a cornerstone of modern programming. No one builds everything from scratch. You'll need to know how to install and utilize external libraries to solve problems efficiently.

File I/O (Input/Output): This is about reading from and writing to files. It's a fundamental skill for tasks like saving data, processing logs, or working with configuration files.

Once you have a solid grasp of these concepts, you'll have a much more complete toolkit and can confidently move on to more specialized or advanced topics.

Thanks, but don't call me fucking ChatGPT.
Anonymous No.106409588
>>106407575
>>106407623
Dataclasses are kino though (without methods ofc). Basically the closest p*thon has to C structs and the only sane way handling systems with dozens of parameters.
Anonymous No.106409709
>>106407547 (OP)
all of that is a class in data structures 99.9% of pyfags have never heard of
Anonymous No.106410122 >>106410286
>>106407575
>you don't even need classes
but everything is an object in python....
Anonymous No.106410286 >>106410437
>>106410122
actually everything except primitives is a dict in python. go ahead, take any "object" x in python and write x.__dict__()
Anonymous No.106410300
>>106408248
>And all the real hardcore Pythonistas get down and dirty to optimize their very slow code by fucking around at the lower level with C when it actually matters?
Anonymous No.106410413 >>106412975
>>106408248
>isn't the main implementation of Python
"main implementation of python" is a pleonasm; there is only one implementation of python, and there can't be any other implementation, because there is no standard
Anonymous No.106410437
>>106410286
>everything except primitives is a dict
dicts are technically a class tho, even the primitives are classes, it's all fucking classes all the way down

>>106408248
>all the real hardcore Pythonistas get down and dirty to optimize their very slow code by fucking around at the lower level with C
fuck C, if I wanted to write a stable project I wouldn't be using this crap in the first place
I use python because it's quick, dirty and I can teach a literal retarded african monkey to use it and create """functioning""" scripts with my janky framework built on 10 other janky frameworks
Anonymous No.106410581
I'm in the social sciences (lmao)
Give me three (3) reasons I should upskill in Python
Anonymous No.106412975
>>106410413
There's at least three independent and complete implementations of Python, seethe more.
Anonymous No.106413693
>>106407547 (OP)
>That's it?
Languages like C++ or Java have strict type checking whereas Python gives zero fucks.

This is why people both hate on and love Python

Its good habit to implement type annotations into your code. Take the following for example:
def IsAnonGay(anon:str="Anonymous")->bool:
return True

The function expects 'anon' to be a string, if none is provided there is a default value, and when calling this function you can expect a bool value
Anonymous No.106415646
>>106407547 (OP)
>>functions
Anonymous No.106415677
>>106407547 (OP)
Python is fucking shit.