135201
You will be muted until you read the rules. Read them! @Rules_for_Python A group about the Python programming language. Offtopic things go here: @pythonofftopic Resources to learn python: @pythonres Group for Hy: @hylang Selenium: @SeleniumPython
is docker like application can i run of python webapp like hosting?
Читать полностью…
Does anyone have the latest version of Python for Android?
Читать полностью…
I am trying to use Flask + Sqlmodel with DDD structer, but i am very beginner in this case
Suppose i am making a database functions in a class Repository which will have some methods like, add_user, remove_user, update_user_data, like this...
But then see below code i got from some places and it say if i will use this i will not need to use the
with session(engine) as session:
session.add(...)
session.update()
def get_session():
with Session(engine) as session:
yield session
why would u even care about Undefined behavior questions
Читать полностью…
Yes, but I don't know anyone on GitHub who publishes them
Читать полностью…
In other words, do you have channels that share bot files or Python tools?
Читать полностью…
It's a one-to-one mapping of command to resulting output. No AI, no magic and no training.
Читать полностью…
How did you guys manage to train this witty bot, Doragonsureiya. I am genuinely curious to know.
Читать полностью…
on this stage of study and in this kind of cases - yes
Читать полностью…
The slower the programming language, the more critical the little things.
But in this case we are talking about the student. He should not get used to bad practices from the very beginning and in the simplest things. He must get used to checking incoming data.
pydroid3 is being updated every time with the latest libraries and modules
Читать полностью…
I almost found this after 2 year old chat, i also want to found a best choice, so i want to know what do you use or choose to use till now, as now i am a beginner.?
Читать полностью…
struct _longobject {
// _object head
uint64_t ob_refcnt_full; // 8 bytes
PyTypeObject *ob_type; // 8 bytes
// _PyLongValue long_value
uintptr_t lv_tag; // 8 bytes
digit ob_digit[1]; // 4 bytes
};PyLongObject on platforms where sizeof(void *) > 4 and sys.int_info.bits_per_digit == 30 was defined as a struct with trailing array, each digit is an uint32_t
Читать полностью…
Python Brain Teaser (Expert Level)
Can you guess the exact console output of this Python 3.11+ code? It tests deep internals like memory management, constant folding, and mutating "immutable" objects.
import sys
import ctypes
def modify_internals():
a = (1, 2)
b = (1, 2)
c = 1000
d = 1000
# 1. What do these print?
print(a is b)
print(c is d)
# 2. Bypassing safety checks to mutate an integer in-place
# (Overwriting the memory of 'c' with the data from '1001')
offset = sys.getsizeof(0)
ctypes.memmove(id(c) + offset, id(1001) + offset, 8)
# 3. What does this print now?
print(d)
modify_internals()
Can you tell me anyone that if i start learning python in beginning level than what kind of book should i read with practice and learn. Can give me the list.
Читать полностью…
Why do people do micro-optimizations in a programming language that's comparatively slow and for a non-critical path?
Читать полностью…