#python-discussion

1 messages · Page 546 of 1

smoky hatch
#

You’re saying this as if I was thinking about what to pick before

brittle merlin
#

@ocean ridge tuiman out now

autumn forge
#

you probably mean == True, but in Python, writing if expr == True: ... is often redundant: if expr: ... achieves the same thing by implicitly casting expr to a boolean value

smoky hatch
#

No, humanoid as in humanoid health for example, or slowing player’s movement speed

brittle merlin
#

I rushed it a little using AI tho

never rush a great project

ocean ridge
frigid trout
brittle merlin
frigid trout
#

But then again Roblox is starting to become a toxic place to develop games.

autumn forge
#

I don't know how much programming experience you already have. If you're a beginner I'd recommend learning the basics of the language before attempting to program graphical applications

brittle merlin
#

did you add searching in text files?

frigid trout
#

What is the shortcut in Visual Studio Code to indent stuff

autumn forge
#

tab

frigid trout
spiral minnow
autumn forge
#

select multiple lines and press tab

short flame
spiral minnow
frigid trout
#

I tried that before but it didn't do anything... now it works

spiral minnow
#

@gentle pine ello! remember me?

floral terrace
autumn forge
#

I think you can also do ctrl+], in the same way that ctrl+[ de-indents the currently selected section

gray siren
#

You are learning in Wrong approach!!

smoky hatch
frigid trout
autumn forge
half pewter
#

anyone else hate pivot tables?

smoky hatch
frigid trout
autumn forge
#

for example, how should ```py
if x:
print('y')
print('z')

floral terrace
gray siren
frigid trout
half pewter
smoky hatch
frigid trout
#

Your projects can be small like at least 10 lines of code

floral terrace
frigid trout
smoky hatch
frigid trout
#

Arguments are something that you pass into a function, right?

floral terrace
frigid trout
autumn forge
gray siren
# smoky hatch But I know some of python, I just don’t know how to use it
  1. Understand the Software Or Platform in 2 to 4 days
  2. Learn Basic Watch tutorials, Note Just Watching tutorial will never be make you Pro U need To dive into it
  3. Make Basic Project in parts, make Basic basic Things which Make You confident and you will be More interested into it
  4. Now Keep On upgrading your self!!
brisk gazelle
#

What happens if you understand it in 5 days?

#

Do you have to go off and do something else?

frigid trout
gray siren
frigid trout
#

Hence Gilbert.

gray siren
frigid trout
gray siren
frigid trout
#

Actually I am not unemployed

gray siren
#

What is your background?

frigid trout
#

Unemployed means someone who is ready to work but can't find a job.

#

I'm not ready to work so I am not unemployed, so I am a student.

short flame
frigid trout
silent fable
#

Hi

stray field
gray siren
frigid trout
short flame
frigid trout
gray siren
stray field
short flame
frigid trout
short flame
frigid trout
frigid trout
frigid trout
gray siren
frigid trout
craggy trench
short flame
craggy trench
#

just be warned, ai output may differ from what you want

gray siren
frigid trout
#

Okay.

short flame
frigid trout
#

Why doesn't it return the full sorted list?#Chicken Sort
#Given a list of integers it will select the largest one then put that into a list to be sorted. After that it will look left
#and right to and if big number near it will sort that too, keep doing till all sorted.
#Made by B3/Snappybettafish
give_list = [2, 5,9,8,4,5]

#Chicken Sort
#Given a list of integers it will select the largest one then put that into a list to be sorted. After that it will look left
#and right to and if big number near it will sort that too, keep doing till all sorted.
#Made by B3/Snappybettafish
give_list = [2, 5,9,8,4,5]
def Chicken_Sort(give_list):
    print("Given List:",give_list)#Given List
    num = max(give_list)
    #print("Largest Number from Given List:",num)
    index = give_list.index(num)
    new_list = [num]
    #print("Sorted List:",newList)
    for i in range(len(give_list) - 1):
        give_list.remove(num)
        num = max(give_list)
        #print("Largest Number from Given List",num)
        index = give_list.index(num)
        left = give_list[index - 1]
        right = give_list[index + 0]
        if left > right:
            new_list.append(left)
            #print("Sorted List:", newList)
            #print(give_list)
            #print(left)
        else:
            new_list.append(right)
            #print(give_list)
            #print(right)
        #print("Sorted List:",new_list)
        return new_list
print(Chicken_Sort(give_list))
#

If I do print(new_list) it gives the sorted list but if I do return new_list it doesn't give the sorted list.

craggy trench
#

you can program anything in AI nowadays, doesn't mean it does what you want it to do but you can program anything in AI

half pewter
#

I hate html but I'd still write it myself before I'd let an AI, Always learn the syntax you're using before you let AI get anywhere near it..

frigid trout
#

Virus

stray field
frigid trout
#

I wrote the thing myself

gray siren
stray field
#

Thanks for not using AI

cerulean ravine
short flame
#

But guys I have something that stuck on my code if user enters data its not saving it in my hard drive

slender urchin
#

If it's a short snippet post it here, otherwise open a help channel

gray siren
frigid trout
#

This doesn't do any phishing scams does it?

#

Why does it show a phishing exclamation mark?

stray field
#

This is a discord invite

charred tusk
#

<@&831776746206265384> Vercel link that redirects to a Discord server with a "create ticket" button that asks for your "wallet ID"

half pewter
#

to a server named "support ticket"

azure pine
#

any resource for pandas aside docs?
more of a practical way to learn ?

gray siren
frigid trout
#

What is the point of pandas and how will it make an AI

inland karma
#

@acoustic kestrel you have a few seconds to fix this

azure pine
frigid trout
#

For his website/link

inland karma
#

!cleanban 1064119452897132545 phishing scams does not work here. you are no longer welcome

edgy krakenBOT
#

:incoming_envelope: :ok_hand: applied ban to @acoustic kestrel permanently.

frigid trout
#

YES, I found the evidence

charred tusk
inland karma
frigid trout
#

You just banned him, right

inland karma
gray siren
rare gazelle
#

hello

frigid trout
#

VirustTotal is a good website to find out bad websites

charred tusk
inland karma
charred tusk
inland karma
frigid trout
#

Oh, didn't know that these bots also send messages like those.

inland karma
inland karma
charred tusk
frigid trout
#

Is there anything I should improve with this algortihm?

#Chicken Sort
#Given a list of integers it will select the largest one then put that into a list to be sorted. After that it will look left
#and right to and if big number near it will sort that too, keep doing till all sorted.
#Made by B3/Snappybettafish
give_list = [2, 5,9,8,4,5]
def Chicken_Sort(give_list):
    print("Given List:",give_list)#Given List
    num = max(give_list)
    #print("Largest Number from Given List:",num)
    index = give_list.index(num)
    new_list = [num]
    #print("Sorted List:",newList)
    for i in range(len(give_list) - 1):
        give_list.remove(num)
        num = max(give_list)
        #print("Largest Number from Given List",num)
        index = give_list.index(num)
        left = give_list[index - 1]
        right = give_list[index + 0]
        if left > right:
            new_list.append(left)
            #print("Sorted List:", newList)
            #print(give_list)
            #print(left)
        else:
            new_list.append(right)
            #print(give_list)
            #print(right)
        #print("Sorted List:",new_list)
    return new_list
print(Chicken_Sort(give_list))
rare gazelle
floral terrace
inland karma
#

.xkcd 303

verbal wedgeBOT
#

'Are you stealing those LCDs?' 'Yeah, but I'm doing it while my code compiles.'

inland karma
#

ahh.. nice

raven urchin
jagged belfry
#

s/code compiling/claude is thinking/g

ashen cipher
#

my docker container is building

frigid trout
#

Python also compiles

stray field
# verbal wedge

Didn't he reuse this one recently but with a changed punchline?

raven urchin
#

time.sleep(600)

Who said so?

rare gazelle
#

instead of banning scammers/spammers/etc
a command that turns the whole server for them into ai generated server
everything continues as normal for them, but its actually ai generated texts trying to mimic us

stray field
#

Instead of "Code's compiling" they said "Github's down"

inland karma
subtle coyote
frigid trout
# inland karma what does the algorithm do?

So you give it a list, then it will sort that list in descending order. It find the largest value of the list then it will remove it and put it into the sorted list then it will look at the +0 index and -1 index of the previous largest value and it will find see which one is the largest and it will continue until it makes the sorted list.

rare gazelle
#

he doesn't know he got banned, might waste his time trying to scam ai generated users

gray siren
#

Bye bye 👋

inland karma
#

but then again, i have multiple django apps in the air at the same time

subtle coyote
#

first rewrite?

inland karma
subtle coyote
#

Ah that makes sense haha

subtle coyote
#

Can't be just basic req response model..

inland karma
subtle coyote
#

That also written in python? The other system..

inland karma
ocean ridge
#

ima write my own vector library in python since i wanna make vectors easy + i want to learn it myself

subtle coyote
ocean ridge
subtle coyote
#

Also isn't Django like overkill for this x..

inland karma
inland karma
subtle coyote
#

Oooh u mean registered ip's

inland karma
#

no... users

#

user A visits page B and C, i want to count that user A has visited those two pages

brittle merlin
#

BRO WHAT IS CHICKEN SORT

subtle coyote
inland karma
inland karma
#

so its just preference, nothhing more

#

could have used flask as well

inland karma
#

or bottle

inland karma
subtle coyote
#

Client side code

inland karma
#

front end?

subtle coyote
#

Mhm

inland karma
#

i have to write a front end as well

#

but its just for statistics

subtle coyote
#

Oh I thought the project was already written

inland karma
#

so i dont have to write it, i can just write a data product and consume the data in looker or something like that

inland karma
subtle coyote
#

Again not talking about caching or anything rn

craggy trench
hybrid nebula
#

I should make a very bad program

#

stdin/out but multiprocessed and over the web

inland karma
hybrid nebula
tame vapor
hybrid nebula
hybrid nebula
#

This Will Not Be A Security Problem Whatsoever

inland karma
subtle coyote
#

Damn

ashen cipher
tame vapor
hybrid nebula
ashen cipher
#

genius

hybrid nebula
#

It's called CGI

subtle coyote
hybrid nebula
#

I wonder if CGI supports websockets

inland karma
#

normally yes, but not this time. i will be done when its done

tame vapor
#

let me google what CGI is in this context, never heard of it

hybrid nebula
#

Common Gateway Interface

#

prehistoric web technology

inland karma
#

the php app has been running for 17 years already, it wiill live a few more months

floral terrace
# inland karma i dont know... a few houndred i think

A quote I heard:

Some of these can be truly horrific "Cthulu Architecture". A giant, ungodly blob of code at the center, with tentacles spreading in every direction and reaching into everything. Even things that appear neat and clean to the outside are actually dependent on the beast below. New things are quickly customized to "integrate" with the beast, because the beast is the core of the organization, after all.

subtle coyote
#

On site..

inland karma
#

its quite large, but the details that connects to countiiing is a 1x1 pixel image beeing loaded or not

subtle coyote
#

Wat

ashen cipher
#

crab

inland karma
#

😄

charred tusk
#

Millions of people get itchy every year

ashen cipher
#

yeah thats why i said crab

#

not crabs

ocean ridge
# inland karma 😄

can u take a look at project showcase ubereats thing. some kid made an illegal tool and is showcasing it there. pinged the mods there

subtle coyote
hybrid nebula
#

Cancer is just Greek for crab

half pewter
#

there's a fun conversation

subtle coyote
#

I mean idk if php is bad.. or upgrading it to a newer version would be bad...

crisp jay
ashen cipher
#

working as intended or whatever

ocean ridge
crisp jay
ashen cipher
#

realistically that would just be ratelimits

#

which i'd expect they'd already did

ocean ridge
#

imagine timmy is at an addresss 'x' and 50 accounts order from the same address all are new, all used the promo code. isnt that a bit sus 🤔

ashen cipher
#

people share addresses

hybrid nebula
#

Lifehack: offer people small amounts of money to accept your package

crisp jay
ocean ridge
ashen cipher
#

how would you determine hte size of the house

#

might be a company

#

i love waiting 3 minutes every time i screw up for my dockerfile to build

inland karma
crisp jay
subtle coyote
#

Ooo yrs that makes sense

crisp jay
#

Or podman is better

ashen cipher
steady rain
ashen cipher
#

all of the apps running on my homeserver cluster (2 rpis) use docker because its nice and neat and everythings self-contained

crisp jay
ocean ridge
crisp jay
#

Which I dont think thats good

silent fable
#

yo hi

#

my larps

mellow tusk
#

Hi, I am Akhilesh from India I am looking for someone who start programming recently in Python.Looking for someone who started recently and wanted a friend/programming buddy with who I can discuss problems teach each other new programming things develop logic and learn and build projects together. You can DM me if you want to learn and build together

inland karma
raven urchin
ocean ridge
silent fable
#

oh yea its cool

#

lazyvim the goat

raven urchin
ocean ridge
silent fable
raven urchin
#

I know some that will blow your mind

ocean ridge
#

Oh, it took me 2 days 😅

silent fable
#

g and gg w/b , im still kinda new tell me some

raven urchin
raven urchin
topaz oxide
#

Any plans for PyCon UK 2026 anywhere that I've missed?

raven urchin
#

Write this:

def hello_world(a, b):
    print(f"Hello {a}")```
#

I'll show you some insane stuff

inland karma
topaz oxide
#

Nvm I've found it !

silent fable
#

oh , no i will soon

inland karma
topaz oxide
#

Their website had not been updated but found it on LinkedIn, thanks for the info

raven urchin
topaz oxide
#

That's a real shame, 2025 was great fun

inland karma
#

yeah, and if i lived in the UK i think i wwould be up for the challenge

grave vale
brisk gazelle
#

I clean my data by wiping it.

frigid trout
#

Why does Blender have a python console in it

ocean ridge
ocean ridge
#

never tried. just know that ti exists

past shard
pallid garden
#

it will be really wiped

ashen cipher
ashen cipher
#

0/10

pallid garden
#

a new blender, right?

#

the pet python is safe

ashen cipher
#

that too

ashen cipher
#

why tf does puddle take 3 minutes to install

ocean ridge
rare gazelle
#

hello

unreal vigil
#

I'm trying Git, and is it enough to just add the .py files I made, or anything else like it suddenly shows about 4000 other files, I guess some are from libraries

ocean ridge
#

or did u do git add .

unreal vigil
#

I manually added the py files from my program, but it started showing all kinds of library files

bronze dragon
pastel sluice
steel whale
#

!pip typer

edgy krakenBOT
#

Typer, build great CLIs. Easy to code. Based on Python type hints.

Released on <t:1777577536:D>.

unreal vigil
#

class FFIError(Exception):
    __module__ = 'cffi'

class CDefError(Exception):
    __module__ = 'cffi'
    def __str__(self):
        try:
            current_decl = self.args[1]
            filename = current_decl.coord.file
            linenum = current_decl.coord.line
            prefix = '%s:%d: ' % (filename, linenum)
        except (AttributeError, TypeError, IndexError):
            prefix = ''
        return '%s%s' % (prefix, self.args[0])

class VerificationError(Exception):
    """ An error raised when verification fails
    """
    __module__ = 'cffi'

class VerificationMissing(Exception):
    """ An error raised when incomplete structures are passed into
    cdef, but no verification has been done
    """
    __module__ = 'cffi'

class PkgConfigError(Exception):
    """ An error raised for missing modules in pkg-config
    """
    __module__ = 'cffi'
inner adder
#

Oh yeah, I forgot that was another Tiangolo project

unreal vigil
#

well I tried

steel whale
#

typer is just click but typed

inner adder
#

Like no extra spaces or anything

unreal vigil
#

does it work if I just ignore that stuff and have the files I made be the main branch?

golden sparrow
grave tree
#

If you want to open a help channel and share a screenshot of what you're seeing that would be helpful

copper marlin
#

hey guys i need someone to test my code

mighty bay
#

do I learn Python or C++

copper marlin
#

python is easier

grave tree
copper marlin
#

i need linux user

grave tree
copper marlin
#

and im not using a linux im on windows

grave tree
copper marlin
#

maybe

terse mauve
#

yo, @inner adder whatsup? I have another cursed thing to show you, wanna see?

inner adder
terse mauve
# inner adder I want to say no but at the same time I want to see it
class C:
    a: int
    b: 'L'
    c: bool
    d: 'M'
    e: tuple
    f: 'A'
    g: str
    h: 'O'

L = "print('somebody')"
M = "print('once')"
A = "print('told')"
O = "print('me...')"


for meow in C.__annotations__.values():
    @__import__("functools").singledispatch(lambda: None).register
    def _(_) -> meow: pass

heheh

inner adder
#

Wait is that import decorator in the preamble?

#

Or did you have to import that separately

#

Not preamble, built ins

#

Know what I mean not what I say

terse mauve
inner adder
#

I actually hate that less

#

But that's mainly because I love single dispatch

#

It's still horrifying though

terse mauve
#

That's how singledispatch works:/

inner adder
#

wait what

#

!d functools.singledispatch

edgy krakenBOT
#

@functools.singledispatch```
Transform a function into a [single-dispatch](https://docs.python.org/3/glossary.html#term-single-dispatch) [generic function](https://docs.python.org/3/glossary.html#term-generic-function).

To define a generic function, decorate it with the `@singledispatch` decorator. When defining a function using `@singledispatch`, note that the dispatch happens on the type of the first argument...
inner adder
#

I would assume it's at least a literal_eval

#

But... no it can't be because it also accepts arbitrary classes

#

I'm suddenly very uncomfortable

terse mauve
terse mauve
shadow verge
#

hi im working a game in python as the back end its a authoritative server and in my game (web based) i someone hit over e303 and broke infinity does python have a way around this limitation

crisp jay
copper marlin
#

i still need more than 1person

terse mauve
inner adder
#

Ah okay

#

I forgot annotationlib was a thing

#

Man I really need to look through all the modules again...

#

I try to do that from time to time so I remember at least what's there

shadow verge
copper marlin
#

its not a random code its on github

shadow verge
#

reminds me of the time if u got the os version it was safe byt the pre compiled binary had malware

inner adder
#

Yeeeep

#

Seen plenty of those

#

"See? Here's the source code! Anyway, install this."

shadow verge
#

I usally dont have binaries for my code

#

only rarely do i have a exe for my code

copper marlin
#

Here's the source code! Anyway, install this. Spotiled.py

shadow verge
#

I should open source my game's client and server but I dont want it to be stolen

shadow verge
mighty bay
#

Is Ai going to cook the job market in the future?

shadow verge
inner adder
#

Not my job

cyan slate
craggy trench
#

ai is not going to cook literally so it depends on which job market you're talking about

shadow verge
#

will ai research break thru abd have True ai where it no longer needs our input for new information

mighty bay
#

I think Ai is gonna set the difficulty to get hired to ultra hard

mighty bay
#

especially in coding related jobs

shadow verge
#

I think ai is still in early stages

copper marlin
craggy trench
#

i mean having the specialty to fix the mistakes that AI does is kind of a pretty high bar for total beginners

copper marlin
#

About
Spotiled is an opensource app that makes ur rgb periperals Glows as a visualizer using ur Spotify music art image color

mighty bay
inner adder
#

Hardware IT guys like me are going to be around for a while longer

#

Someone needs to be around to jiggle the cable when the AI gets stuck

mighty bay
shadow verge
#

ai still hasn't fully matured and intill we can find a way to make models smarter wit les new data i think we're gonna hit a limit

inner adder
#

"capable"

mighty bay
#

That's what I was considering

inner adder
#

I don't think the answer is going to be in LLMs either

mighty bay
#

like going into networking

cold kite
#

We need Opus 8.9

inner adder
#

This is another stepping stone

cold kite
mighty bay
shadow verge
#

but on a real note ai is at a point its running out of high quality data to train on

mighty bay
#

CCNA related you know

inner adder
#

Right

copper marlin
#

guys how do u set ur exe file an icon i use resource hacker

#

instead of the python image

inner adder
#

I never actually got any of my certs...

#

I should have at least done my A+ when I had the chance

#

All my knowledge is far too old now

mighty bay
#

but programming is just too vast and I don't have the drive for it

inner adder
#

Nothing wrong with that. I only program as a hobby

terse mauve
inner adder
#

I only got my associates

mighty bay
inner adder
#

There's a long story there

inner adder
#

From the stories some of my friends have told me about even senior devs at their work, most people could out do them

mighty bay
#

but as far as I see I'm gonna have no trouble getting a ccna related job

inner adder
#

Yeah MSPs are going to be around for quite a while

terse mauve
inner adder
#

Out program some of the devs at some places

mighty bay
#

I had a 3 month internship that's about it

hybrid nebula
#

MSPs?

inner adder
#

Managed Service Provider

terse mauve
inner adder
#

Like an outside IT firm that takes care of stuff

#

We have one for our networking and backend stuff

mighty bay
inner adder
#

Arrogance breeds ignorance. I don't know if that's an actual quote but I'm saying it

#

The more you think you know best the more likely you are to ignore new information and new ways of doing things

#

For better or for worse

mighty bay
inner adder
#

Always be willing to learn

inner adder
mighty bay
#

I cannot comprehend how the major software and systems were made before Ai

inner adder
#

And tons of trial and error

mighty bay
#

I enrolled in a CS degree, I do have interest towards some of the stuff but I have no drive to learn coding for sure

inner adder
#

And then publishing those errors

#

CS is more than just code, though

#

A lot more

mighty bay
inner adder
#

I would have thought that would be CIS

#

Computer Information Systems

#

But I guess they can overlap

#

I always viewed CIS as practical application and CS as theory

proud escarp
#

recently been enjoying busting out horrendous code, just pumping out features
manually, of course. this is what i enjoy the most

mighty bay
#

/ Data Center Technician

proud escarp
#

it's a well made organized platform, the challenges are fun too

#

i was interested in cybersec and took 2 courses in uni but ngl i dont think it's for me now

inner adder
#

Cybersec is not as glamorous as people think it is

#

Hope you like writing reports!

proud escarp
#

sigh

tall vector
crisp jay
floral terrace
mighty bay
inner adder
#

I prefer to just hit computers until they work

hybrid nebula
inner adder
#

HA

inner adder
#

You're damn smart, so that helps

hybrid nebula
mighty bay
tall vector
# inner adder You're damn smart, so that helps

I'm not gonna be too self deprecating so I will admit I'm a pretty good engineer, but honestly as anti-abuse stuff goes it was being in the right place at the right time, and with weirdly specific platform knowledge kekw

proud escarp
floral terrace
proud escarp
inner adder
#

Information Technology is more about implementation and working with live systems. System administration, network administration, technical support, etc.

mighty bay
hybrid nebula
inner adder
#

Not like... directly at the sun, right?

mighty bay
#

I don't wanna be a personal trainer either, I find it repulsive

proud escarp
#

sun gazing... first time hearing about that one

inner adder
#

Because I'm pretty sure you'd start hearing bacon sizzling noises coming from your eyes

mighty bay
#

while being exposed to the sun

mighty bay
hybrid nebula
proud escarp
#

hope you're using sunscreen

tall vector
inner adder
#

HA

hybrid nebula
#

lol

mighty bay
inner adder
#

The sun is a myth, there is only haze

mighty bay
#

The key is balance

#

just don't overexpose your skin to the sun, you gotta feel it when its too much

hybrid nebula
tall vector
#

This weekend is supposed to be rainy and cloudy... which is an issue because my job currently is packing parachutes for skydiving, which is somewhat reliant on the weather actually being good enough for people to skydive

mighty bay
#

Ideally I want to spend most of my time out

hybrid nebula
#

ah yes, the only job where you lose customers if you do it poorly

inner adder
#

I wish I had half the energy you do

tall vector
#

I follow the whims of my mind and they lead me to strange fucking places lol

silver plover
mighty bay
tall vector
hybrid nebula
tall vector
#

packing is exhausting

silver plover
inner adder
#

The man has been on voice chat while climing a cliff

#

He has crazy energy

tall vector
#

man those were the days

hybrid nebula
past shard
#

Oh hello

hybrid nebula
#

you have a lot more energy when you're up in the air

mighty bay
silver plover
tall vector
#

I joined a staff meeting on a 30km cycle once during covid times lol

mighty bay
past shard
#

David goggins

hybrid nebula
jagged belfry
#

blessings of the digital era

mighty bay
#

falling from the sky

#

xD

hybrid nebula
#

+mv²/2

hybrid nebula
#

well yeah

inner adder
#

Distracting and distressing

tall vector
#

(also skydiving is obviously not that physically demanding in the falling part, but if you imagine the sort of brain-tired you get after a day of driving because of concentrating, that happens skydiving but wayyyy more potent)

mighty bay
jagged belfry
#

?.?

#

we doin basic human companionship as fomo now?

mighty bay
#

I have infinite energy but no drive to learn coding

hybrid nebula
wise imp
crisp jay
floral terrace
rare gazelle
#

hello

mighty bay
#

failed

cerulean ravine
hybrid nebula
floral terrace
#

if you feel the urge to constantly check your phone while doing something unrelated, I'll say FOMO

grim hatch
#

Good morning Pythoners

tall vector
#

Anyway I'm going out to hunt an old aqueduct that I found on 1940s maps but which is largely gone now :) best career advice I can give (which is a low bar) is fuck around and find fun stuff, then do your best to make the fun stuff work for you
cya

mighty bay
# hybrid nebula ~~adhd~~

I went to a psychiatrist, she does not think I have it. I even specifically asked if I might have it

hybrid nebula
#

I was joking (unless I had been right)

mighty bay
#

I was prescribed some anti depressants that did not do anything but make me tired so I threw them away and never went to a psychiatrist again

wise imp
#

oh my, just got to experience a true "restore from backup" moment after having accidentally git cleaned some files, thankfully I had configured a full user directory backup (to google drive, via deja dup or whatever) a long time ago and this is the first time I'm reaping the fruits

#

well, I may have spoken too soon because the restore is taking forever and doesn't appear to be making any progress, but anyway

#

remember to back you Python files up guys

hybrid nebula
grim hatch
wise imp
silver plover
#

"symexp" would've been nicer, I guess.

past shard
scenic swallow
#

Is python hard?

grim hatch
past shard
grim hatch
#

That's the short anwser

past shard
#

Nothing is easy if it is valuable

scenic swallow
#

How much u guys will scale python out of 10 in hardness

grim hatch
#

I'd give it a 4

scenic swallow
past shard
wise imp
haughty crane
#

where do i start learning networking?

past shard
#

Being either intimidated or free because someone said python is [x] is not good

scenic swallow
#

I am asking the hardness when u guys start learning

past shard
#

He died twice

spiral minnow
scenic swallow
grim hatch
wise imp
# past shard He died twice

yk, they say that a person dies twice, first when they die and second time when their name is said for the last time

past shard
#

Like from One piece I don't remember

#

Dr. sum

scenic swallow
wise imp
#

it sure doesn't originate from One PIece

hybrid nebula
past shard
hybrid nebula
past shard
#

Not 10 but x

hybrid nebula
#

Java is definitely 1 language

past shard
wise imp
past shard
wise imp
#

I wouldn't say that

#

I would say that I hate Java though

past shard
#

And the guy rated it 7

wise imp
#

dammit, I thought you may have meant that

wise imp
scenic swallow
hybrid nebula
#

Java is very nice to the programmer

wise imp
# scenic swallow Getting the opinion of users

if you've never been exposed to text programming languages, it might be harder than if you already have experience in say some other language, like obviously it's pretty subjective
I'm more interested in what you plan on doing with that information though

past shard
#

There is 10% chance I am seriously saying smthng and that is either to a beginner or to Eivl

wise imp
#

you serious?

past shard
merry lintel
#

hi

elfin urchin
#

Hi guys this maybe weird but I'm looking for internships

merry lintel
#

how to print in python?

elfin urchin
#

print(python)

wise imp
merry lintel
merry lintel
ocean ridge
elfin urchin
ocean ridge
#
print("Hello")
wise imp
ocean ridge
ocean ridge
elfin urchin
merry lintel
#

dw, ik how to print 🙂

#

print("67")

past shard
edgy krakenBOT
ocean ridge
past shard
#

Some good resources for starting out

wise imp
elfin urchin
#

Let's not dig deep

past shard
ocean ridge
grim hatch
elfin urchin
#

How to print your current python version

hybrid nebula
elfin urchin
#

Anyone ?

hybrid nebula
elfin urchin
hybrid nebula
#

py --version

wise imp
# ocean ridge nvm then i thought he tried to print an undefined variable

that may have been what they were doing, but "not found" wording in a typical case would suggest not that the code ran and failed, but the code didn't even get to run, because python was not found, as in the program/executable (and it just so happens that the undefined name was also python, but that would have then thrown a slightly differently worded error if it ran)

hybrid nebula
#

in a terminal

elfin urchin
#

No no

#

In editor

#

don't use terminal

wise imp
#

why not?

elfin urchin
#

That's what I wanna ask ?

wise imp
#

I suppose a pretty reliable way to get the actual version your IDE is executing your file with would be to do this in Python then:

import sys
print(sys.version)
#

maybe that's what you meant anyway

covert forum
#

Hi

minor stream
#

Hi

willow dragon
#

hi

velvet trout
ocean ridge
surreal knoll
steady rain
#

So, python

#

.topic

verbal wedgeBOT
#
**What's your favourite aspect of Python development? (Backend, frontend, game dev, machine learning, ai, etc.)**

Suggest more topics here!

steady rain
#

I use it for AI, but the programs I enjoy writing the most are general automations

ocean ridge
floral terrace
#

not having to think much about syntax

#

...and the chat is dead again

sand hornet
cerulean ravine
# verbal wedge

i like that i can use the same language for work, for high-use open source projects, and for personal math-art projects.

inner adder
# verbal wedge

I like that it makes it easy to screw around with my various ideas

#

And there's always something interesting to learn about it or a new library to look into

floral terrace
#

so umm, what happen if I declare the same name for class-level and instance-level attributes in a class

cerulean ravine
#

for example:

cerulean ravine
gaunt badge
#

This is sometimes used, e.g. with functools.cached_property

cerulean ravine
floral terrace
ocean ridge
fossil steeple
#

anyone wanna join a team of ppl tryna make an ai

ocean ridge
#

using python to do smth in maths always feels fun

floral terrace
rotund steppe
#

is anyone into High-frequency trading (HFT)

charred tusk
#

Woah wait what
Updates mypy from 1.20.2 to 2.0.0
What's Dependabot trying to tell me here

floral terrace
cerulean ravine
charred tusk
#

Lol, mypy heard you and took that personally
Literally 17 hours later -- mypy 2.0 released with

Mypy now supports experimental parallel and incremental type checking.

charred tusk
#

unfortunately, past me was all responsible, so I don't get to play with it until next week

[tool.uv]
exclude-newer = "P7D"
charred tusk
#

Why more than a week?

cerulean ravine
charred tusk
#

Fair

#

It's all arbitary anyways

cerulean ravine
inner adder
robust ledge
robust ledge
ocean ridge
charred tusk
brittle merlin
robust ledge
#

I've applied a filter. The list can be empty.

charred tusk
#

It's technically true
But still catches me off guard every time I see it

ocean ridge
cerulean ravine
robust ledge
#

Ah good. UV_EXCLUDE_NEWER. I can just enforce this on the boxes and not change a thing. 0.2.12? This is new new.

#

wait.. no, we're in 0.11?

charred tusk
#

we are

robust ledge
#

mixed the numbers up in my head.

charred tusk
#

Also heads up
My private artifactory causes errors like these

warning: kerp_sdk-3.0.0.tar.gz is missing an upload date, but user provided: 2026-04-25T01:41:34.891233564Z
warning: kerp_sdk-3.0.0-py3-none-any.whl is missing an upload date, but user provided: 2026-04-25T01:41:34.891233564Z
  × No solution found when resolving dependencies for split (markers:
  │ python_full_version >= '3.14' and platform_machine == 'x86_64' and
  │ sys_platform == 'linux'):
  ╰─▶ Because kerp-sdk==1.1.0 has no publish time and there are no versions of
      kerp-sdk, we can conclude that kerp-sdk>=1.1.0,<2.0.0 cannot be used.
      And because core[redacted] depends on kerp-sdk>=1.1.0,<2.0.0
      and your workspace requires core[redacted], we can conclude
      that your workspace's requirements are unsatisfiable.
Error: Process completed with exit code 1.
#

Not sure if yours will do the same

amber comet
#

guys help i cant understand whats a return statement

brittle merlin
charred tusk
edgy krakenBOT
#
Print and return

Here's a handy animation demonstrating how print and return differ in behavior.

See also: /tag return

amber comet
#

ik what a function does but wth is a return

gaunt badge
ocean ridge
amber comet
#

im.. sorry i understood nothing😭

grave tree
charred tusk
ocean ridge
floral terrace
raw bramble
#

Python calms me down

ocean ridge
brittle merlin
#

@cerulean ravine so are you taking a rough threshold/ greyscale of an image, decreasing the resolution and resizing the tiles based on brightness values at individual pixels??

pastel sluice
#

!e

def thing():
  return 1

x = thing()
print (x)
edgy krakenBOT
velvet trout
#

mypy 2.0 released? Lets gooo!

raw bramble
#

If I say

print(next_number(3))
That will evaluate and essentially be
print(4)

amber comet
#

so basically basically what i know is that a funcion is this thing you do to save time, like maybe make it print somthing

brittle merlin
#

@cerulean ravine i wanna see what happens when u add grain on top of the image and then apply the Truchet filter

inner adder
#

!e

def ham():
  pork = "I will be returned from the function"
  return pork

print("We're going to call the ham function and get the value it returns")

beef = ham()

print(beef)
edgy krakenBOT
pastel sluice
raw bramble
#

I can also say

new_num = next_number(7)

print(new_num)

This is me assigning that value to the variable, so it’s saying that new_num = 8

amber comet
#

well uhm what were parameters again?

raw bramble
#

Functions are often used in place of repeated lines of code, and for abstracting, where you don’t need to worry about how something works as long as it works

cerulean ravine
raw bramble
inner adder
pastel sluice
inner adder
#

When you call a function like ham(), you give it arguments. Those arguments are placed in the parameters of the function

amber comet
#

so return is like a print in some way?

brittle merlin
#

damn i need to learn PIL

grave tree
raw bramble
#

like

def next_num(input_num):

input_num is a parameter, it’s a variable that you give a value to by calling that function with an argument

so

next_num(3)
3 is the argument, so input_num = 3

inner adder
velvet trout
cerulean ravine
brittle merlin
#

its fine ill explore it later

raw bramble
amber comet
#

so yeah a print for functions, correct?

inner adder
#
def function(parameter):
  return value

pork = function(argument)
grave tree
amber comet
#

in some way

velvet trout
raw bramble
# amber comet ok whats an argument now

Basically just parameters but when you call a function instead of when you define them, people get mixed up over the names all the time but don’t worry abt it too much

raw bramble
grave tree
#

Yeah, at this stage I wouldn't worry about the "argument" vs "parameter". Just focus on understanding return

inner adder
#

The terminology can be picked up as you go along

velvet trout
raw bramble
inner adder
#

More or less

velvet trout
inner adder
#

"Arguments are thrown, parameters catch" is how I think about it

amber comet
#

im watching a vid rn trying to understand it

raw bramble
#

I think the more we talk about the two the more we’ll confuse people

velvet trout
#

Hol' up chat, Lambda is cooking. Let him cook.

inner adder
#

@shrewd pine I think of things weirdly

charred tusk
#

we noticed

#

Hi Hem
How goes

inner adder
robust ledge
#

makes sense to me.

velvet trout
#

I don't see any confusion yet, seems like we all agree on the same definition

inner adder
#

It goes

charred tusk
#

amen

raw bramble
grave tree
velvet trout
#

I see

raw bramble
charred tusk
inner adder
raw bramble
#

But yeah, return ‘prints’ things to your code, where your code can read it and use it

velvet trout
#

wait.... Another case where a beginner is linking print with return?

#

ducky_concerned interesting

raw bramble
velvet trout
#

I see

grave tree
raw bramble
#

printing is the first thing you do in programming, and it is similar in a sense

charred tusk
inner adder
#

Oh derp, I just realized I don't have images auto load so I couldn't see the gif

amber comet
#

i think I THINK i understand it now

gleaming knoll
# amber comet in some way

its similar in the sense that both are forms of output, but otherwise different
i assume you know what print does, but about return:
you use a function by calling it, right? so in your program source code, when you use a function, there is a "call expression" that looks like function(arguments)
and the thing about expressions is they evaluate to a value, like how 2 + 3 evaluates to 5
return is how you define what the function call will evaluate to, if you have def function(parameter): return something, when you do function(argument),
the expression something is evaluated to some value, lets call it value, and thats what value the call expression function(argument) will evaluate to (and, obviously, once an expression evaluates, its done, so when a given function call hits return - thats the end for this function)

amber comet
#

though frankly seeing more examples would make me understand it better

raw bramble
floral terrace
inner adder
#

!e

def add_two(number):
  return 2 + number

ham = 3
pork = add_two(ham)
print(pork)
edgy krakenBOT
raw bramble
gleaming knoll
#

i dont want to assume that beginners cant read more than 2 sentences
both because its not true and because that would mean humanity is doomed and i'd rather delulu myself

inner adder
#

@amber comet I can pare down my example further if you need me to

raw bramble
amber comet
raw bramble
inner adder
#

Sort of. You still need something to catch what is returned from the function

amber comet
#

?

grave tree
inner adder
#

Like in my example, I have pork = add_two(ham). I need pork there so that I catch the value that the function returns

#

That is what lets me use it

raw bramble
#

You’re using z as a variable, but z only exists inside that function

inner adder
#

Otherwise that returned value just disappears

amber comet
#

uh suree

raw bramble
#

Your function is great, the only problem is the end

amber comet
#

i thought so

raw bramble
#

You’ve technically not said what z is, since you never defined a variable outside the function

amber comet
#

it shouldve been print(add(number 1, number 2))

raw bramble
#

if you said

my_var = add(2,3)

print(my_var)

It would work

raw bramble
amber comet
#

well atleast i got some basic understanding

#

thnks guys

raw bramble
amber comet
#

im originally learing ai in python i just wanted to go back to functions cause i didnt quite understand them

inner adder
#
def store(order):
  return order

waks = store("ham")

@amber comet Another way I can explain it is that someone has to be there to receive it. Like if you go to the store and order something, someone has to be there to receive it. If you just did

store("ham")

No one would be there to pick up the ham

charred tusk
#

Oh no! But the ham would get cold!!

amber comet
#

yeah

raw bramble
inner adder
#

Apologies, I explain things weirdly

charred tusk
#

No that was actually really good

raw bramble
inner adder
#

It's the perfect analogy for it

velvet trout
#

!print

#

Or !gif or whatever it had moving values in animation

gleaming knoll
# amber comet ?

ok so another point is
like, you already used functions other than print, right? probally input?
and when you used input you were able to do like, something = input(), right?
but how does the string that the user inputted end up "in" the variable something? if the definition of input was to print the string it read', that wouldnt work. the user input would just be repeated in the terminal, but not end up in the variable something. instead, it returns it
same thing with sum([1, 2, 3]) returning 6 rather than printing it. thats how x = sum([1, 2, 3]) is able to set x to 6 rather than implicitly print 6, and that makes you able to actually use the value later in the code

charred tusk
velvet trout
#

Who needs gif when lambda is already cooking

charred tusk
#

Lambda is scary

#

GIF is safe

velvet trout
inner adder
#

Lambda is smart. I treasure him

gleaming knoll
# charred tusk Lambda is scary

scary would be if i started talking about how function calls work on the interpreter level, with the returning address being popped from the call stack and the return value being put on the temporary value stack
oops i just did it
sorry

floral terrace
inner adder
#

HA

inner adder
#

I can't think about lambda without thinking about Half-Life

frosty oriole
harsh swallow
gleaming knoll
#

robin have you already watched daredevil born again season 2

frosty oriole
#

yeah

gaunt badge
raw bramble
frosty oriole
inner adder
#

It's all Greek to me

raw bramble
gleaming knoll
# raw bramble Is it good

i like charlie cox's daredevil, so im watching it. only started season 2 though
sad that punisher isnt in it, he was cool too

raw bramble
floral terrace
harsh swallow
gaunt badge
charred tusk
#

Oh Robin you're awake
Check your pings

Also try waking up before noon

inner adder
#

But I have a feeling I'm going to love it

gaunt badge
inner adder
#

Cheers

raw bramble
gleaming knoll
#

typing challenge make nontrivial codebase typecheck on all of : mypy strict, pyright strict, pyrefly strict
add in ty for extra spiciness

gleaming knoll
charred tusk
gleaming knoll
charred tusk
#

Everything I write runs mypy --strict and ty

gleaming knoll
#

i found a bug in zuban yesterday but i didnt understand what it was and didnt report it

charred tusk
#

I found a bug a while back and didn't understand it
I just went to their Discord and said "I should probably tell an adult"

#

Never did get a response 🙁

gleaming knoll
#

TRUSTED. ADULTS.

raw bramble
gleaming knoll
#

git clone linux cd linux sudo rm -rf ./* git push best programmer

gleaming knoll
#

who is we? i
fuck.. i use arch

robust ledge
#

sounds like a you issue.

raw bramble
#

I’m actually really worried about my computer?

gleaming knoll
raw bramble
#

I reinstalled arch a couple of months ago, and nothing has went wrong?

#

I’ve not encountered any issues whatsoever?

summer tide
#

that's because you don't use your computer properly

raw bramble
#

It’s really scary

velvet trout
brittle merlin
#

any project ideas that would make me good at async programming?

gleaming knoll
cerulean ravine
tired dust
#

Can python get you rich?

charred tusk
summer tide
raw bramble
gleaming knoll
steady rain
summer tide
#

or u can start a startup writing python whatever

raw bramble
velvet trout
#

!pip rich

edgy krakenBOT
#

Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal

Released on <t:1775982240:D>.

floral terrace
gleaming knoll
velvet trout
brittle merlin
velvet trout
#

_vendor
_

steady rain
loud sapphire
#

Watsup snakes

velvet trout
loud sapphire
#

I'm new to python

velvet trout
loud sapphire
#

floral terrace
gleaming knoll
#

the critical sections in async are blocks between await, because, well, its just normal code, running synchronously on a single thread
race conditions in async happen on await when the event loop ends up context switching to a coroutine that you didnt expect to, and it changes some state that your original one depends on
if you have some state that you need to ensure wont randomly get changed by other coroutines on await, you use a lock or something

velvet trout
#

and i still mess up with them 🥀

floral terrace
#

so ... sync?, nvm

velvet trout
#

multiprocessing 😋

#

IIRC, I used asyncio.Lock when i was writing on a PeerConnection's buffer so two msgs being written asynchronously won't collide and won't make an invalid packet

gleaming knoll
floral terrace
velvet trout
brittle merlin
#

await returns a coroutine object, whats that some special kind of object?

gleaming knoll
brittle merlin
#

i feel like i need to understand the whole event loop first

gleaming knoll
#

do you know generators? if you do then you already are mostly there

velvet trout
#

or maybe my code was stupid than asyncio issue lol

brittle merlin
floral terrace
main swan
velvet trout
gleaming knoll
floral terrace
#

do async lists and generators do anything?

gleaming knoll
floral terrace
brittle merlin
steady rain
main swan
#

@gleaming knoll did I tell you about that time I wrote an async factorial function?

gleaming knoll
brittle merlin
#

ok yeah not just execute but all the event loop stuff like queueing anther process when one goes into io...

floral terrace
main swan
# inner adder Wait what why

Ok! So here me out: I had users submit a (potentially very large number) that my webserver calculates the factorial of. The thing is, factorial would be slow and essentially DDOS the site if too many people tried the factorial. So I made it async and sleep a bit after each multiplication to keep things running smoothly.

steady rain
inner adder
gleaming knoll
#

which means that each time you "pull" a value, until its actually ready (e.g. if the production of this value depends on a network request), you could have other stuff running

main swan
edgy krakenBOT
#

app/routers/problems/brocard.py line 8

async def factorial(n):```
main swan
inner adder
#

It's unorthodox for sure

#

But I like it

main swan
#

I live for those funny wtf but smart moments lol.

brittle merlin
floral terrace
#

oh ye, make sense, still, is it worth it? context swapping like crazy sounds unnecessary and just create a bunch of overheads

inner adder
gleaming knoll
brittle merlin
#

u can add loaders

gleaming knoll
floral terrace
brittle merlin
willow dragon
#

i d start python yesterday anyone can give me some help

main swan
gleaming knoll
# floral terrace That I understand, it's asyncio in general. I'm talking about async loop specifi...

the context switching of the async event loop is not much different from context switching from the loop code to the generator code when iterating over a generator
and you dont see people saying "wow the overhead is so insane that my performance tanked from iterating over a generator", its just replacing the call frame: setting the return address and locals
like yeah iterating over a generator will be slightly constant-time (per iteration) slower than iterating over a list but its not significant compared to other things applications do