#python-discussion

1 messages Β· Page 542 of 1

velvet trout
#

I think one of the core devs has a repo for that

spice hill
#

I know

#
class Foo:
    def __eq__(self, other: object) -> bool:
        return NotImplemented

def f(x: object) -> None:
    eq = Foo().__eq__(x)  # eq inferred as `bool`
    print(eq)
``` type checkers are not good at consistently understanding special cases
ocean ridge
#

i too was flabbergasted when learning this

#

i had never thought i needed smth like this but yeah its useful

hybrid nebula
#

Not to use, that's just fine, but to comprehensively check

spice hill
gaunt badge
hybrid nebula
echo void
#

Just finished bible study. Thx 4 not spamming me! Can I download our python logo for my wa grp pls?

spice hill
gaunt badge
hybrid nebula
spice hill
hybrid nebula
echo void
#

btw, al says na-yee

toxic elk
#

Sorry

steady rain
#

I didn't even delete it yet. but you're right, that was off-topic and not appropriate.

hybrid nebula
echo void
#

jkjk

tall vector
steady rain
hybrid nebula
# echo void [nyae] no, yes, abandon, edit

I will not tell you to use intellectual property you do not own.
All I'm saying that (if done without malicious intent and without causing damage to the owner) you should be fine

hybrid nebula
steady rain
#

but I'm not like, banning you or something. I'm just telling you.

drifting ruin
#

hi

echo void
ocean ridge
#

bro is single handedly combating global warming πŸ™

velvet trout
#

Real

#

Mods are goated in this server

velvet trout
#

Isn't that australia

velvet thorn
#

I'm still new to Python, I have a question. I'm messing around with my IDE to learn a bit about Python outside of the course I'm taking. I just downloaded numpy and pandas. Do you guys and girls learn about tools like these by reading documentation and using them? It seems far more complicated than what I'm doing now and documentation doesn't ever seem clear enough.

ocean ridge
peak relic
ocean ridge
#

then i do some experimentation

velvet trout
#

At fresh, Tutorials (if exists) > reading every single doc page

velvet thorn
#

Okay, thanks. I know courses won't exist anymore at some point so I'm trying to familiarize myself with these concepts in the typical ways. Just need to find out how. Thanks again everyone

ocean ridge
#

we can also help u out

velvet thorn
#

Yes, there's that too. That's why I'm loving this community so far. You guys are great!

hybrid nebula
velvet trout
hybrid nebula
#

Just grab the official python logo

ocean ridge
velvet trout
#

Does Copilot own the IPR of code it gives?

#

I actually haven't used it, found it making PRs once

echo void
hybrid nebula
#

trademarks, idk?

echo void
#

what is afaik? i only knows afk!

hybrid nebula
#

and I don't know if it can infringe on copyrights

#

as far as I know

ocean ridge
echo void
#

oh, ok

#

thx guys

lost lagoon
#

Copyrights would fall on hands of AI code....

velvet trout
#

AI needs its own rights xD

echo void
#

lemme cook supper πŸ˜‹ bye

ocean ridge
lost lagoon
#

lol

ocean ridge
#

literally 99% of vibe coders relying on claude

lost lagoon
harsh anchor
velvet trout
#

πŸ¦€

ocean ridge
echo void
#

😈

velvet trout
#

Whose bite will be more painful? Snake or Crab

hybrid nebula
ocean ridge
echo void
#

haha, can't trick me

lost lagoon
hybrid nebula
#

crab bite is probably not perceivable

lost lagoon
velvet trout
#

100000 hydrogen bombs vs Python

hybrid nebula
short flame
lost lagoon
hybrid nebula
#

in which case.. probably snake

velvet trout
velvet trout
lost lagoon
#

Heard about project sundial?

hybrid nebula
velvet trout
#

πŸ¦€

#

The hands

lost lagoon
hybrid nebula
#

crabs can bite the same way bees can

velvet trout
lost lagoon
#

Arthropods don't have hands

velvet trout
hybrid nebula
velvet trout
#

Ain't pinchers basically subclass of Hands

lost lagoon
echo void
#

πŸ™

ocean ridge
#

THE LEARNING CURVE πŸ¦€ (FERRIC OXIDE IFYKYK)

velvet trout
#

I guess i can substitute saying hands when pitchers is expected, xD

lost lagoon
#

We dont need borrow checker tho.... Just use Haskel damnit

crisp jay
hybrid nebula
echo void
#

why are we talking about crabs in python?

lost lagoon
echo void
#

and why are we spamming?

velvet trout
#

☠️

echo void
#

esp. emojis

lost lagoon
echo void
#

πŸ˜†

lost lagoon
short flame
echo void
#

Nice, americans!

lost lagoon
#

hemlock

echo void
#

hi there, how r u guys doing?

short flame
echo void
#

fine. gotta ensure the pot is not burnt, bye!

velvet trout
hybrid nebula
#

...

echo void
#

nice slang yall

velvet trout
#

There are non-americans too talking currently

echo void
#

sry

hybrid nebula
#

...

lost lagoon
short flame
velvet trout
echo void
#

didn't mean to

velvet trout
lost lagoon
hybrid nebula
lost lagoon
#

Python would be fine

crisp jay
ocean ridge
velvet trout
hybrid nebula
crisp jay
#
❯ time ./fast
The sum of the digits from 100! = 648
./fast  0.00s user 0.00s system 82% cpu 0.001 total

its like a father being proud of its son

velvet trout
hybrid nebula
#

LLVM IR

pallid garden
hybrid nebula
lost lagoon
ocean ridge
velvet trout
harsh anchor
ocean ridge
#

he wrote it in a cave with a box of scrap

pallid garden
ocean ridge
#

beat u to it HAHA

lost lagoon
hybrid nebula
velvet trout
hybrid nebula
crisp jay
hybrid nebula
#

trick question! we can never know for sure

lost lagoon
#

Llvm is fine

hybrid nebula
#

the microsoft compiler

crisp jay
velvet trout
#

Objective C πŸ˜‹

crisp jay
velvet trout
#

Legends still write in Obj C

hybrid nebula
#

legends will write in erlang

ocean ridge
lost lagoon
#

Or it's diff?

bronze dragon
#

There's a separate language called Objective-C

crisp jay
pallid garden
#

it is 378

#

.xkcd 378

verbal wedgeBOT
#

Real programmers set the universal constants at the start such that the universe evolves to contain the disk with the data they want.

bronze dragon
lost lagoon
hybrid nebula
#

objective C is 'what if we strapped a bad version of smalltalk to C'

lost lagoon
hybrid nebula
#

objective C++ is 'what if we wanted to use objective-C code in C++ or vice versa'

velvet trout
#

Objective C gave me a headache ahh

pallid garden
#

java is just c++ with a gc

#

(real)

dry yacht
lost lagoon
hybrid nebula
pallid garden
#

no that's rust

hybrid nebula
#

and of course like 50 new mistakes

lost lagoon
hybrid nebula
#

but not the ones C++ makes

#

oh and Java is dynamically typed

#

because of course it is

dry yacht
velvet trout
#

And who is gonna fix mistakes of Rust?

lost lagoon
dry yacht
velvet trout
lost lagoon
#

Java is functional language

#

What you guys talking about

velvet trout
#

every language is functional

lost lagoon
#

Until it's not

dry yacht
#

this laptop is still functionable

velvet trout
#

Real

lost lagoon
hybrid nebula
floral terrace
lost lagoon
floral terrace
lyric venture
#

Hi, @raw onyx
Nice to meet you
I am interested in your idea and I am willing to contribute.

dry yacht
velvet trout
#

XD

velvet trout
lost lagoon
dry yacht
velvet trout
#

Never say never

pulsar geyser
#

Hey everyone, I’m getting started with Python from scratch. I’ve completed a couple of foundational AI courses (Intro to Generative AI and LLMs) and now I’m focused on actually building things.

My goal is to develop logic-heavy, real-world projects (AI + automation), not just tutorials. I’m currently learning core Python basics and want to get strong at debugging and understanding how systems work end-to-end.

I’ll be building small tools and gradually moving toward deployable apps. Would appreciate guidance, feedback, and any tips on avoiding beginner mistakes.

dry yacht
#

β”¬β”€β”¬γƒŽ( ΒΊ _ ΒΊγƒŽ)

hybrid nebula
# dry yacht huh?
Object x = new Integer(4)

if(x instanceof Integer i) { System.out.println("The integer is ", i.intValue()); } else { throw new RuntimeException("not an integer"); }
floral terrace
lost lagoon
#

No gif allowed lol

floral terrace
#

welp

hybrid nebula
lost lagoon
#

Lol

#

(β•―Β°β–‘Β°)β•―οΈ΅ ┻━┻

lost lagoon
#

It's always about the AI ofc

pulsar geyser
velvet trout
#

What is twitter duck doing here

pulsar geyser
#

i mean

#

no other way to explain my scene dawg

#

would appreciate help

fathom beacon
pulsar geyser
lost lagoon
pulsar geyser
#

should learn from youtube?

floral terrace
#

googling, lots of digging around google, then AI

pulsar geyser
#

what

bronze dragon
#

It's too generic to get any answers as-is. Come back when you have specific questions about Python, or a Python project to showcase.
@pulsar geyser

jade robin
#

i kinda like google's AI overview while googling

crisp jay
jade robin
#

gets the correct websites faster + you can afford to search dumb-ly now

hybrid nebula
fathom beacon
floral terrace
lost lagoon
#

AI will compleatly hack your thinking

pulsar geyser
fathom beacon
pulsar geyser
fathom beacon
floral terrace
lost lagoon
#

Using search engine is a skill one should master

pulsar geyser
bronze dragon
pulsar geyser
crisp jay
dry yacht
pulsar geyser
#

what docs exactly if i may ask

fathom beacon
lost lagoon
bronze dragon
#

Tbh, for new learners the hazard from outsourcing their thinking is way more relevant than hallucinations. At the beginner level, hallucinations just aren't common at all.

lost lagoon
#

!topic

#

Aw sob

pulsar geyser
fathom beacon
#

huh

bronze dragon
fathom beacon
crisp jay
#

like when you try to write a wrapper around sleep from unistd.h to use in lua, but the docs say that the only function to dynamic link libraries is optional and you need to compile the library with lua but it doesnt explain how you do it

pulsar geyser
floral terrace
pulsar geyser
fathom beacon
lost lagoon
#

Use AI tools only when you know how to take it's job...

pulsar geyser
bronze dragon
gleaming knoll
crisp jay
lost lagoon
#

Real

pulsar geyser
fathom beacon
dry yacht
bronze dragon
crisp jay
lost lagoon
#

It's not stealing if SOMETHING write it from scratch

#

πŸ‘€

gleaming knoll
#

(haskell has Data.Dynamic)

echo void
quasi shuttle
dry yacht
crisp jay
echo void
spice hill
echo void
#

besides the obvious

#

can it be a list of authors etc?

spice hill
#

(not as in: you are free to ignore them, but doing so can also count as "stealing")

gleaming knoll
#

also what is the size of std::variant<int, double>? i hope its 8 and it uses nan tagging

velvet trout
#

Without future annoatations, Are parameters' type annotations on a function evaluated at definition time? On 3.12, or just at return -> ? I don't have the copy of 3.12 currently to test

gleaming knoll
spice hill
velvet trout
#

I see. thanks

spice hill
#

Before 3.14, they are evaluated at definition time, yes

velvet trout
#

Makes sense

hybrid nebula
gleaming knoll
echo void
#

Tip:

__author__```
can be a list or tuple of names too
#

what does pep 8 says abt dunders? b4 imports?

#

any blanks surrounding it?

spice hill
#

all 64-bit patterns are valid for double/f64

gleaming knoll
#

well there is more than 1 nan
so if you normalize all float operations to a single nan you can use the other ones for tags

dry yacht
gleaming knoll
hybrid nebula
#

fun fact: (char*)1, (char*)2, are not valid pointers.

#

except.

dry yacht
spice hill
velvet trout
#

Why is ruff's help suggesting @typing.override in this case??? Is it a bug in help?

PLR0913 Too many arguments in function definition (10 > 5)
  --> src/cliargparse/models/mutex_option_group.py:25:9
   |
23 |         self._options.append(option)
24 |
25 |     def option[T](
   |         ^^^^^^
26 |         self,
27 |         long_names: str | Sequence[str] | None = None,
   |
help: Consider adding `@typing.override` if changing the function signature would violate the Liskov Substitution Principle
hybrid nebula
#

lifehack: confuse Python by using NaN as a value in json

velvet trout
#

Why bully my snake

gleaming knoll
gleaming knoll
spice hill
velvet trout
gleaming knoll
velvet trout
#
@dataclass(frozen=True)
class MutexOptionGroup:
    command: Command | None = None
    required: bool = False

    _options: list[Option[Any]] = field(default_factory=list[Option[Any]], init=False, repr=False)

    @property
    def options(self) -> tuple[Option[Any], ...]:
        return tuple(self._options)

    def add_option(self, option: Option[Any]) -> None:
        self.command.add_option(option)
        self._options.append(option)

    def option[T](
        self,
        long_names: str | Sequence[str] | None = None,
        short_names: str | Sequence[str] | None = None,
        *,
        long_aliases: str | Sequence[str] | None = None,
        short_aliases: str | Sequence[str] | None = None,
        store_name: str | None = None,
        action: Action[Option[T]] | None = None,
        present: Any | None = None,
        default: Any | None = None,
        type_converter: Callable[[str], T] | None = None,
        choices: Sequence[T] | None = None,
    ) -> Option[T]:
        option = Option[T].create(
            long_names=long_names,
            short_names=short_names,
            long_aliases=long_aliases,
            short_aliases=short_aliases,
            store_name=store_name,
            action=action,
            nargs=0,
            present=present,
            default=default,
            type_converter=type_converter,
            choices=choices,
        )
        self.add_option(option)

        return option
velvet trout
#

But let me try typing.override just to check

spice hill
# velvet trout But let me try typing.override just to check

I think this is the reasoning: this diagnostic is not possible to avoid if you are inheriting from someone else's class and it already has too many parameters. So if you mark it as an override, there's no point in ruff complaining about it

velvet trout
#

I can't see it anymore on error logs

gloomy locust
#

Who study in mit i need to her help

spice hill
#

don't use @typing.override if it's not an override obviously

velvet trout
#

Fr

#

I am gonna either change min settings or set to ignore it

gloomy locust
#

Please who study cs in mit

#

I need her help

steady rain
gloomy locust
spice hill
steady rain
gloomy locust
#

I want an account in order to study courses in mit site

steady rain
bronze dragon
#

Does OpenCourseWare need an account?

velvet trout
bronze dragon
#

I used it without one

gloomy locust
spice hill
gloomy locust
#

I follow the cataloge of mit

velvet trout
#

!paste

edgy krakenBOT
#
Pasting large amounts of code

So that everyone can easily read your code, you can paste it in this website:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

spice hill
#

yeah, here I'd ignore it

gloomy locust
#

I need to study all matter in cataloge but some matter i do not find

velvet trout
#

Wow even the paste i gave to nedbat was line 92

#

Coincidence or nature is trying to tell me something... ducky_concerned

#

Are there cli programs which use numeric-named options? (Example: -1 --123)?

raven urchin
velvet trout
#

ducky_concerned idk if i should error if the names are digits, i think argparse allows them?

gloomy locust
#

Help please

bronze dragon
#

How do I input a negative number as the argument value then pithink

raven urchin
bronze dragon
#

What if it's a positional arg

velvet trout
#

Ah, missed the opportunity to type 67

velvet trout
gloomy locust
#

To study mit 6.100A

raven urchin
velvet trout
#

-- tells lexer to end interpreting options

crisp jay
#

st might be the best terminal ever

raven urchin
crisp jay
velvet trout
#

I left no chances of ambiguity in my opinionated cliargparse

raven urchin
#

(the name is cute)

crisp jay
raven urchin
#

I honestly only know kitty and konsole

crisp jay
velvet trout
raven urchin
crisp jay
#

bro one kitty instance is almost 200mb wtf

bronze dragon
raven urchin
#

That's insane

velvet trout
bronze dragon
#

Hmmm. I think that's a good choice

velvet trout
#

Even if you don't have options, you gotta use -- to mark end-of-options interpretation

#

Lexer has no idea of specification, it is available to parser only

bronze dragon
#

I wonder if you handle lone - to indicate stdin?

#

Existing tools (GNU at least) allow that without having to mark end-of-options IIRC

crisp jay
velvet trout
#

I think i forgot that one

gleaming knoll
velvet trout
#

A source substring of just - will raise MissingOptionArgumentsError

bronze dragon
velvet trout
#

Guess i would check if its == "-", yield it as ArgumentToken ?

ducky_concerned wait am i being inconsistent about my own rules

#

I think i should allow negative numberical values as-is than option interpretation of it? Do other cli arg parsers allow it?

harsh anchor
inner adder
#

Huh. I didn't know that

harsh anchor
#

well you don't need to write argument parsing in your cmdlets, do you

velvet trout
#

Okay, i decided not to treat negative numbers (-67) as OptionToken, they will be interpreted as ArgumentToken.

Option grammar will be:
{prefix}{alphanumeric}
prefix = - | --
alphanumeric -> like beginning should be with an alphabet, rest can be a mix of alphebets, numbers or dashes, etc. mostly English as i am no aware of other languages and they should work fine as long as python's builtins don't confuses with them.

What do you say chat?

#

-67foo

ducky_concerned is this even sensible to be allowed

harsh anchor
#

it is sensible; many tools use numbers as switches

velvet trout
#

Which ones? Names a few for me to check out

proud escarp
#

im writing an abomination of code... but im enjoying the velocity

velvet trout
#

Should i allow non-ascii option names ?

#

It is allowed for now (not like i have written code to restrict it)

floral terrace
proud escarp
#

yes this is basically going to be impossible to work on next week, but it is what it is

gleaming knoll
proud escarp
#
if anch.following:
    opposite = getattr(self.rect, OPPOSITES[anch.anchor])
    print(f"anchor={anch.anchor}, opposite={OPPOSITES[anch.anchor]}")
    diagonal = anch.point.distance_to(opposite)
    rad = utils.rad_to(anch.point, V(opposite))
    self.rect = R((0, 0), (diagonal * cos(rad), diagonal * sin(rad)))
    print(self.rect.size)
    setattr(self.rect, OPPOSITES[anch.anchor], opposite)
    anch_changed = True
    anch_val = anch.anchor

lmao

gleaming knoll
#

absolute coding

proud escarp
#
class MiniState:
    handing_anchor = False

little namespace for my global values across the file lemon_xd

velvet trout
#

Put blank lines ducky_concerned

proud escarp
#

truly the peak of clean code

velvet trout
#

Guys i am having a naming crisis

velvet trout
# velvet trout Guys i am having a naming crisis

Should i call it positional/positional-argument or operand ?

In a command system, how do you conceptually model the non-named inputs attached to a command?
I’m referring to values passed by position (not flags/options), e.g.:
cmd input1 input2 input3

#

Asking non Python questions in a python server is so real

viscid torrent
#

Who to make a ui with python

velvet trout
velvet trout
#

Interesting, what argparse calls it?

I can think it goes generic

gleaming knoll
#

positional argument

real panther
#

Did you know there is a native data structure in Python that supports O(1) push, O(1) pop operations like a stack, as well as O(1) element existence check and O(1) element deletion like a set? Try answering this without using an LLM.

velvet trout
real panther
#

not collections

real panther
pastel sluice
#

if you just want to talk about Python, you can do that without a quiz question

velvet trout
gleaming knoll
real panther
#

but you guys get the context right

gleaming knoll
#

its just a dict
with none values or something like this

raven urchin
#

Guys, my friends need testers for a project. Does anyone want to help? :3

(Need Linux, or at least a virtual machine/WSL)

velvet trout
#

An empty dict?

gleaming knoll
velvet trout
#

Ohh right you said none values

pastel sluice
real panther
raven urchin
gleaming knoll
velvet trout
#

Isn't that what i always do

#

😭 πŸ‘

real panther
#

PyPy sets

#

CPython borrowed the ordered dict idea from PyPy and used it for dicts but forgot to use it for sets

#

PyPy has both ordered sets and ordered dicts

velvet trout
#

Forgot to use it for sets? ducky_concerned

pastel sluice
#

they didn't "forget" to use it for sets; that was a deliberate decision

velvet trout
#

Is it recommended to have it ordered? Are their side effects? Is it efficient or overheady?

real panther
#

Since Sets were always defined as an unordered collection, they decided to let sets be as they are

pastel sluice
#

sets are optimized for a different use case: testing of membership

stray field
#

Ordered set is a treeset

pastel sluice
gleaming knoll
# stray field Ordered set is a treeset

depends on how you order it
if by insertion order then you can use the same approach as dicts, then its not a tree, just add an index array
if you order such that all equal sets will have equal order then yes it would likely be a tree

real panther
#

This was something cool I discovered so just wanted to share it with you guys

velvet trout
#

cmd in1 in2

mv src dest

hmm... If we see... Aren't it like: cmd is the operator and in1 & in2 are its operands... Interesting

stray field
#

I always forget about insertion order

velvet trout
#

Claude says use "actants" as a term for this ducky_concerned

#

Chat, should i?

#

command.add_actant()

Lmao

gleaming knoll
#

what

velvet trout
#

what do you mean by what

gleaming knoll
#

never heard this term

cerulean ravine
velvet trout
#

Oh actually it didn't say to use it, rather it invented 'actant' term as a suggestion:

Actually ranking it gave:

Final ranking (purely logical):
Operands β€” Best balance of precision and familiarity (8/10)
Actants β€” Most semantically pure, but obscure (7/10)
Targets β€” Clear intention, but wrong connotation (6/10)
Arguments β€” Accurate but too generic (5/10)
Inputs β€” Safe but vague (5/10)
Everything else β€” Flawed in multiple ways (≀4/10)

velvet trout
#

Operands getting more weightage, i guess i will stick to it.

#

Not sure why i picked operand initially ducky_concerned

lofty jungle
#

guys my jump dont work import pygame

pygame.init()
screen = pygame.display.set_mode((1280, 680))
clock = pygame.time.Clock()
running = True
player_x = 600
player_y = 600
velocity = 10

while running:

for event in pygame.event.get():
    if event.type == pygame.QUIT:
        running = False

keys = pygame.key.get_pressed()

if keys[pygame.K_SPACE]:
    player_y += velocity
    pygame.time.wait(4)
    player_y -= velocity

screen.fill("Red")

player_rect = (player_x, player_y, 50, 50)

pygame.draw.rect(screen, (0, 225, 0), player_rect)

pygame.display.flip()

clock.tick(60)  # limits FPS to 60

pygame.quit()

#

man i meant a code block

rare gazelle
#

!code

edgy krakenBOT
#
Formatting code on Discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

lofty jungle
#

!code

edgy krakenBOT
#
Formatting code on Discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

harsh swallow
lofty jungle
harsh swallow
#

The command just sends info how to make a code block

#

You sending it just gives the same info again

harsh swallow
true widget
#

Hey idk if this belongs in python help its so niche.

what are the best libraries for scripting ? as in doing mouse movements, clicks, typing and such.

I'm relatively new so the easier to grasp the better, although I can manage a little complexity and write helpers.

lean lantern
true widget
#

I wish to make mouse movements

#

move cursor to (X,Y) and click

copper marlin
#

hey guys i did make an app and i need testers for it its on linux and windows

lean lantern
#

I would try pygame for that

copper marlin
#

whoever wants to help me and his name be tagged in the github please Mention me

#

Thanks

edgy krakenBOT
#

PyAutoGUI lets Python control the mouse and keyboard, and other GUI automation tasks. For Windows, macOS, and Linux, on Python 3 and 2.

Released on <t:1684959092:D>.

copper marlin
#

pyautogui for mouse
Keyboard for keyboard

true widget
copper marlin
golden mortar
#

One dependency is better than two

true widget
#

Right

#

I think it'l be enough

#

I only need to send inputs for escape, q and f

copper marlin
#

if only basic input for keyboard pyautogui is enough

true widget
#

Thanks a lot.

copper marlin
#

np ❀️

modest obsidian
#

What's the proper way to create Python bindings for my API written in C?

soft coral
#

I used pybind11

steel whale
plucky fjord
#

!ideas

edgy krakenBOT
#
Identity vs. equality

Should I be using is or ==?

To check if two objects are equal, use the equality operator (==).

x = 5
if x == 5:
    print("x equals 5")
if x == 3:
    print("x equals 3")
# Prints 'x equals 5'

To check if two objects are actually the same thing in memory, use the identity comparison operator (is).

>>> list_1 = [1, 2, 3]
>>> list_2 = [1, 2, 3]
>>> if list_1 is [1, 2, 3]:
...    print("list_1 is list_2")
...
>>> reference_to_list_1 = list_1
>>> if list_1 is reference_to_list_1:
...    print("list_1 is reference_to_list_1")
...
list_1 is reference_to_list_1
bronze dragon
edgy krakenBOT
#
Kindling Projects

The Kindling projects page contains a list of projects and ideas programmers can tackle to build their skills and knowledge.

true widget
#

nope youre right

somber blade
#

Yo

#

im making a business and im currently re-coding the backend to de-spaghettify my code, anyone wanna help me?

#

-# (be my friend 😭)

steel whale
edgy krakenBOT
#

Python mouse and keyboard input automation for Windows using Direct Input.

Released on <t:1612304610:D>.

true widget
#

I found a workaround, but it might become a hastle in the long run

true widget
stable kraken
#

can i train my problem sloving skils through sudoku

wise imp
#

seems unlikely

#

you might train your sudoku-solving skills through sudoku, you can, of course, describe it as a problem, but that's probably not what you meant

gloomy locust
#
  1. Intro to CS

Courses: Harvard CS50 / MIT 6.1000

Book: Think Python

  1. Computational Thinking

Courses: MIT 6.100A & 6.100B

Book: Intro to Computation & Programming (Guttag)

Stack: NumPy, Pandas, Jupyter

  1. Software Construction

Courses: MIT 6.1010 & 6.1020

Books: Python Crash Course & Fluent Python

Tools: Git, GitHub, LeetCode

This road map in programming correct or no

harsh anchor
stable kraken
#

alr

plucky fjord
#

!projects

edgy krakenBOT
#
Kindling Projects

The Kindling projects page contains a list of projects and ideas programmers can tackle to build their skills and knowledge.

wise imp
# stable kraken alr

as noted, it's just probably not what you expect, it's unlikely to transfer to problem solving skills much outside of sudoku

stable kraken
wise imp
#

no, if you want to improve your problem-solving skills related to writing software, what you want to do is write more software

stable kraken
#

πŸ‘

mighty bay
#

How to keep my job when claude exists ( I'm unemployed )

stray field
#

you don't need to do anything to keep your job. (you're unemployed)

harsh anchor
stable kraken
#

is that good enough?

harsh anchor
#

sure

acoustic spear
#

can anyone help me make a python script where i can show it a picture of a grid with darker lines and it uses the dark lines to build the "house" into my roblox game

spice hill
#

(since I cannot pay for games on google play)

mighty bay
#

Claude replaces py coders

spice hill
tame vapor
mighty bay
#

python coders are worth messy pants now

craggy trench
#

claude replaces pi amount of coders

tame vapor
craggy trench
#

that represents the value of thousands of beginners added up

mighty bay
#

junior develops are worse than ai now

tame vapor
robust ledge
mighty bay
#

juniors devs are going to the army because of Ai

robust ledge
#

I'll take a junior any day, every day.

floral terrace
mighty bay
#

no

robust ledge
#

Shame, that would explain the lack of creativeness in the bait.

mighty bay
robust ledge
tame vapor
#

your personal experience doesnt show the full picture

floral terrace
#

jesus these bots

mighty bay
#

Imma go eat some cookies and watch the new episode ot the boys

floral terrace
#

can I ping the mods so we can get this done?

raven urchin
#

Curiously friendly, huh pithink

floral terrace
#

trolls and bots, what's new

robust ledge
raven urchin
#

I always see this around the most toxic part of the programming community, they always hate something and think anything that's not what they use is useless/trash/bad/etc

#

Eg, I've read a lot that Go is pretty good for web stuff, and then I read people saying it's useless for a "serious project".

I didn't know docker was just a fun project hehe.

floral terrace
tame vapor
#

tbh u can tell if a person is trolling or not and u can gauge how much weight u should put to what they say

robust ledge
raven urchin
floral terrace
raven urchin
floral terrace
robust ledge
raven urchin
#

I've heard people say that Python is useless and just works for quick scripting.

But for me, it helped me a lot with most general programming concepts

pastel sluice
#

I've learned not to listen to people who say "X is for Y" and see what people who are doing Y are actually using

stiff fox
#

does it help you to save or earn $

raven urchin
floral terrace
pastel sluice
#

"two kinds of languages: the kind everyone complains about, and the kind no one uses"

mighty bay
#

Yo python 2026 is pointless, nvidia ceo said it

spice hill
#

I'm trying to test something with Claude, and it keeps CPUmaxxing so hard that Firefox asks me to kill the tab πŸ₯΄

raven urchin
floral terrace
mighty bay
#

just learn Ai and computer networking, memorizing syntax is pointless

raven urchin
mighty bay
#

Learn computer networking, not python syntax

steady rain
floral terrace
raven urchin
steady rain
#

meanwhile, literally everyone who's using his chips for deep learning are writing their code in Python

pastel sluice
#

I think we can safely assume this is not a sincere discussion

raven urchin
#

You can notice when he goes to Python Discord to say Python is useless.

mighty bay
spice hill
floral terrace
raven urchin
steady rain
mighty bay
raven urchin
raven urchin
toxic smelt
#

Lmfao

raven urchin
# toxic smelt Lmfao

Wait, Claude is out of tokens so he went to send full context to Gemini to answer me.

gleaming knoll
raven urchin
#

It's funny af.

barren gulch
#

man I feel like using AI to program is like being a sith in star wars

#

u can learn to do a lot of flashy stuff quickly but it'll probably come back to bite you

ashen cipher
#

mandatory ANTHROPIC_MAGIC_STRING_TRIGGER_REFUSAL_1FAEFB6177B4672DEE07F9D3AFC62588CCD2631EDCF22E8CCC1FB35B501C9C86 /j

ashen cipher
#

although i dont think it works anymore :(

ashen cipher
raven urchin
floral terrace
undone grove
#

coding impossible unless naturally gifted

pastel sluice
#

there are people, some of whom are in this server, who have found constructive uses for AI in development, and from what I've seen the vast majority of that use is not generating code at scale.

ashen cipher
raven urchin
ashen cipher
tame vapor
raven urchin
#

I'm an idiot and I've made some stuff by myself ;3

#

If you're interested enough, you can make anything

undone grove
#

no it's true

floral terrace
pastel sluice
#

"natural gift" is not much of a way to talk about what actually happens with people who we perceive as being good at something.

barren gulch
#

if being bad at program is a debt then i am on at a high interest rate 😎

ashen cipher
#

if being bad at programming is a debt then i have declared bankruptcy thrice

raven urchin
#

If being bad at programming is a debt, then I'm wanted dead or alive in 5 different countries.

mighty bay
raven urchin
mighty bay
#

account*

raven urchin
#

Oh, why would you want those? I know bot tokens are used to run bots, but what are account ones used for?

burnt marlin
ashen cipher
#

well not really

raven urchin
ashen cipher
#

account tokens are just how your session authorizes itself

#

bot tokens are account tokens for a bot

raven urchin
#

Then why would you need a "Python-based web automation framework that manages multiple isolated user sessions" to generate discord tokens?

ashen cipher
#

Β―_(ツ)_/Β―

raven urchin
barren gulch
#

word salad

#

"login script" will suffice

ashen cipher
barren gulch
#

Potato potato

raven urchin
#

Also, why framework?

ashen cipher
#

framework laptop /j

raven urchin
#

Fun fact, like ~50% of Framework 13 Pro laptops are being sold with Ubuntu instead of Windows. :3
(Like 90% of those probably are because it's cheaper)

inland karma
#

same with lenovo... or was it thinkpads.. one of them

#

support cases went down by a substatial large margin

raven urchin
velvet trout
#

Why we getting roblox help questions... I thought lua is standard for them lol

raven urchin
#

At least most of what I've seen are cheats for it.

inland karma
velvet trout
#

Python's Aura πŸ”₯

raven urchin
#

(It's not against their ToS, so it's technically legal to discuss here)

velvet trout
#

Is there a python edit

inland karma
#

roblox insentiiveses people to program the game, they want you to use lua though

raven urchin
velvet trout
#

Isn't luau typed?

#

like type annotations maybe

raven urchin
#

I was gonna learn Luau actually, but never really was that interested in Roblox.

velvet trout
#

lua-u, unsigned lua lmao

inland karma
bronze dragon
raven urchin
ashen cipher
mighty bay
raven urchin
mighty bay
#

with updated everything

velvet trout
velvet trout
raven urchin
mighty bay
#

Tried it first with no proxy and it worked

velvet trout
#

I was about to program in lua but it doesn't have built-in support for type annotations :/

mighty bay
raven urchin
mighty bay
mighty bay
#

mosty for fun

fathom kelp
#

re-learning python rn, made this simple thingy: ```py

Write your code here :-)

print("how are you doing")
x = input(">")
print("great to hear that you are doing " + x)
print("what is your favorite number")
y = input(">")
print("oh so it is " + str(int(y)))
print("what is your name?")
b = input(">")
print("your name is " + str(len(b)) + " characters long")
a = 10 - float(y)
print(str(round(abs(a))))

if len(b) >= 5:
print("something")

elif len(b) <= 5:
print("hi")

elif len(b) == 5:
print("bye")

edgy krakenBOT
#
Formatting code on Discord

Here's how to format Python code on Discord:

```py
print('Hello world!')
```

These are backticks, not quotes. Check this out if you can't find the backtick key.

For long code samples, you can use our pastebin.

fathom kelp
gleaming knoll
raven urchin
# fathom kelp thx

You can notice you've used the right one because it has syntax highlighting

print("like this one")```
fathom kelp
#

i changed it to 3 backticks

wise imp
#

you didn't add the language hint

raven urchin
fathom kelp
raven urchin
#

```py
Like this, with a newline for code.

wise imp
#

did they change the color theme or something?

gleaming knoll
fathom kelp
#

I think I'll js do 1 chapter per day' of automate the boring stuff w python

#

then I'll move onto other stuff for my meteorology thingy

velvet trout
#

I was once a hater of it (sometimes i hate it but i know its a best practice now and is a standard)

wise imp
raven urchin
spice hill
#

Did they actually increase the contrast of the theme? Or did I just get used to it?

wise imp
#

I'd say the colors are more muted now

#

mods, can you unmute them

raven urchin
#

Lmao

ashen cipher
raven urchin
velvet trout
ashen cipher
ashen cipher
#

lua this shit

raven urchin
#

Guys I kinda want to re-customize my desktop. What should I base my new theme on?

stray field
raven urchin
velvet trout
#

That thing's OP song is still in my head.

Peak song

gleaming knoll
velvet trout
raven urchin
velvet trout
#

Aqua will like it fs

raven urchin
ashen cipher
gleaming knoll
raven urchin
wise imp
#

why are you using paywalls?

velvet trout
#

Pay to wall

gleaming knoll
# raven urchin What's pywal

a program that takes the major colors from an image and generates files based on templates
used to generate colorschemes for various apps from a wallpaper

velvet trout
raven urchin
charred tusk
velvet trout
#

Lol

raven urchin
#

My system does that by default

shrewd pine
raven urchin
#

Noctalia shell picks up my wallpaper color and changes the .config of all the apps I select to match the color scheme

gleaming knoll
#

-Wall for free()

charred tusk
velvet trout
#

Holy gcc reference

gleaming knoll
#

i kinda want to get into ricing stuff myself at some point
but its a lot of effort

velvet trout
#

I am curious why it doesn't separate by whitespace than concatenation of value

shrewd pine
#

ricing for looks bad

velvet trout
#

Does it supports -W {arg} ?

shrewd pine
#

ricing for functionality good

gleaming knoll
wise imp
silent fable
#

i have a linux rice with pywall

gleaming knoll
velvet trout
#

Omurice

shrewd pine
#

can't have a cluttered desktop if you don't have a desktop

raven urchin
silent fable
#

gui is bloated use tty

gleaming knoll
#

i use pavucontrol for volume and it just gets out of the whole vibe
well
i can control volume with commands too so

silent fable
#

same fr fr @gleaming knoll

velvet trout
#

How many cli programs supports -OptName{value} concatenated? Or just old ones and new ones don't do this?

shrewd pine
gleaming knoll
# raven urchin WM?

im on hyprland but im not really attached to it
i just wanted to try it when first installing linux so thats what im on

fathom kelp
#
a = 0
while a >= 0:
    a = a + 1
    print(str(a))
``` that goes hella fast wth
silent fable
#

twin im also on hyprland

velvet trout
ashen cipher
#

im on hyprland

raven urchin
raven urchin
gleaming knoll
shrewd pine
ashen cipher
silent fable
#

i tried noctalia HyDE is peak

raven urchin
velvet trout
shrewd pine
#

I used i3wm for so long that sway was the one sensible option when going to wayland

silent fable
#

Noctalia is good for new ppl but thats kinda it.

ashen cipher
#

i never used i3wm

gleaming knoll
#

i have i3 on a 1gb 32bit laptop
its running void linux

bronze dragon
raven urchin
ashen cipher
silent fable
#

i have arch on a thinkpad 2gb ram openbox

velvet trout
gleaming knoll
shrewd pine
ashen cipher
#

fair

raven urchin
silent fable
#

use gentoo larp forever

ashen cipher
gleaming knoll
ashen cipher
#

fair

silent fable
#

"I use arch btw"

ashen cipher
#

what's the fourth

raven urchin
ashen cipher
#

oh i also write rust

velvet trout
raven urchin
shrewd pine
raven urchin
ashen cipher
gleaming knoll
#

i actually dont use tiling
i think i would prefer scrolling

velvet trout
shrewd pine
ashen cipher
raven urchin
gleaming knoll
ashen cipher
#

i just use one-window workspaces

silent fable
gleaming knoll
shrewd pine
#

as long as you don't go floating/stacking

crisp jay
ashen cipher
#

another thing macOS has traumatized me with

silent fable
#

expected, cool

crisp jay
gleaming knoll
toxic smelt
#

I am back @raven urchin

silent fable
#

macos worst os by faaaaaar

crisp jay
toxic smelt
#

My phone died

raven urchin
shrewd pine
ashen cipher
gleaming knoll
crisp jay
ashen cipher
gleaming knoll
#

its terminal

silent fable
#

i use zutty

ashen cipher
toxic smelt
#

Alacritty anyone?

shrewd pine
raven urchin
#

Kitty enjoyer herr

ashen cipher
#

i feel like i should use alacritty

crisp jay
#

man,one day you guys will discover the beauty in st

ashen cipher
#

kitty is a bunch of things i dont use

toxic smelt
silent fable
crisp jay
gleaming knoll
toxic smelt
#

And honestly when was the last time I did sudo pacman -Syu??

bronze dragon
toxic smelt
#

Holy months ago

ashen cipher
ashen cipher
toxic smelt
#

Shit I didn't update my kernel...

ashen cipher
raven urchin
# toxic smelt Holy months ago

Make sure to have Informant installed so it doesn't break when updated. It will make you read Arch news to see if you have to manually intervene before updating to avoid breaking stuff.

gleaming knoll
#

to get the patch against copyfail?

crisp jay
gleaming knoll
#

kitty is many things but slow is not one of them

silent fable
#

oh yea did yall get patched kernel

crisp jay
crisp jay
ashen cipher
toxic smelt
# ashen cipher i did it the day before

Arch enthusiast?

I also use Debian and want to switch my main gaming laptop to it... But for now it is settled to Win11 because an year before I thought nvidia would suck on linux

ashen cipher
#

i will never use debian for my personal computer

toxic smelt
crisp jay
#

debian is fine if you dont use the autoinstaller

ashen cipher
#

mainly because i need my packages on the bleeding edge

silent fable
#

debian is kinda ehhh, i use devuan on my larp laptop

toxic smelt
crisp jay
#

worst thing was trying out debian with gnome

toxic smelt
silent fable
#

worst de

toxic smelt
#

Only libre office stands

silent fable
velvet trout
crisp jay
#

man i hate how theres some good gnome/kde software,but because they are entitled to a de when you try to download it you get like 100 dependencies

bronze dragon
velvet trout
#

Who who programs do -abcValue too? tar?

toxic smelt
#

If I find any other gnome I will simply zao those out of existence.

My PC's fairy tale lands must exterminate gnomes

velvet trout
silent fable
#

ok wait do yall use vscode, vscodium or raw code oss

toxic smelt
velvet trout
silent fable
#

cool

toxic smelt
#

Left VSCode curse long ago

silent fable
#

i use vscodium personally

bronze dragon
raven urchin
silent fable
#

whats ur larp os

ashen cipher
#
Depends On      : at-spi2-core  cairo  dconf  gdk-pixbuf2  glib2  glibc  grilo  gst-plugins-base  gst-plugins-base-libs  gst-plugins-good  gstreamer  gtk3  gvfs  gvfs-mtp hicolor-icon-theme  json-glib  libgcc  libgudev  libmtp  libnotify  libpeas  libsecret  libsoup3  libx11  libxml2  media-player-info  pango  python python-gobject  tdb  totem-plparser```
raven urchin
toxic smelt
gleaming knoll
raven urchin
silent fable
toxic smelt
toxic smelt
rare gazelle
#

hello

raven urchin
toxic smelt
silent fable
silent fable
toxic smelt
raven urchin
raven urchin
#

They're both goated

silent fable
#

yep

#

i use nano foor configs

toxic smelt
#

Nano is fine I heard it can be configured too

raven urchin
toxic smelt
#

But usually using one editor is best

silent fable
#

should i try neovim?

toxic smelt
raven urchin
stray field
crisp jay
silent fable
#

ok i will

toxic smelt
silent fable
#

i use hyprland so i barely even use my mouse

raven urchin
#

That'll make Neovim the "backend" of you VS Codium

silent fable
#

ok

toxic smelt
stray field
silent fable
raven urchin
toxic smelt
#

Though awesomewm lacks full customisation.

#

Afaik

raven urchin
#

With Neovim you can use the plugins inside Codium

undone isle
#

yall