CARVIEW |
Select Language
HTTP/2 200
date: Wed, 30 Jul 2025 23:19:42 GMT
content-type: text/html; charset=utf-8
cf-ray: 967895154b98c183-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=fdcd30ec-db8e-46d6-9b62-a9b1c09ce281; expires=Thu, 30 Jul 2026 23:19:41 GMT; domain=.stackexchange.com; path=/; secure; httponly
strict-transport-security: max-age=31536000; includeSubDomains
vary: Accept-Encoding
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
x-clacks-overhead: GNU Terry Pratchett
x-frame-options: SAMEORIGIN
x-request-guid: efdc3241-45da-4813-bdb1-e52efc66e4d9
x-worker-origin-response-time: 413000000
x-dns-prefetch-control: off
set-cookie: prov=fdcd30ec-db8e-46d6-9b62-a9b1c09ce281; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=1vPNZir2_1CBk7123lZDSvWayoQ52CKLCdS9kVRv4UA-1753917582-1.0.1.1-gJRVVTcs6P_mJKH5vMsfpIwZlvWEeUe5_yNnOag94_Qi0AziDYlt4iDw6i02Nafja2OLitzi.1SRDL1ks3t8.u_vK.jU2NhGuiQFmRljoD8; path=/; expires=Wed, 30-Jul-25 23:49:42 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=en_EFLF6b7Iq9UahPxDRWFNWBtAD.SUrqckrkZUmC58-1753917582072-0.0.1.1-604800000; path=/; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
server: cloudflare
content-encoding: gzip
Newest 'python' Questions - Software Engineering Stack Exchange
Skip to main content
Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
The 2025 Developer Survey results are in. Explore insights into technology and tools, careers, community and more.
View results.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about TeamsQuestions tagged [python]
Python is a dynamically typed, high-level interpreted programming language. Its design focuses on clear syntax, an intuitive approach to object-oriented programming, and making the right way to do things obvious. Python supports modules and exceptions, and has an extensive standard module library. Python is general-purpose and thus used widely, from the web to embedded systems.
2,033 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
6
answers
488
views
Is OOP really beneficial for enterprise-scale business software compared to procedural languages like ABAP or COBOL?
I'm currently drafting a Python coding standard for internal enterprise use, primarily targeting business applications that involve heavy data access, reporting, and transactional logic.
In this ...
0
votes
2
answers
332
views
Global State, How To Do IT?
im kind of a newbie so take me easy
i face a problem every time i make a project
specially Client projects, which is Global State i always struggle to do it
for example, here is the structure of one ...
3
votes
2
answers
212
views
How to structuring a read/write submodule in OOP Python
I am developing a python package that needs to be able to read/write from/to multiple formats. E.g. foo format and bar format. I am trying to contain the functions relating to each format in a single ...
1
vote
1
answer
90
views
Python: mapping the content of a structured text file to dictionary tree
I'm looking for a method to map the content of a structured text file to a nested dictionary (dictionary tree). The text file consists of (nested) sections with each section starting with the pattern ...
4
votes
2
answers
461
views
Control flow and communication with two separate frontends (maybe with exceptions)?
I am trying to write a backend for use with a completely text based UI for one shot operations (eg. python scriptname arg, executes that argument and exits) and a GUI using the curses library for some ...
3
votes
1
answer
216
views
How to manage working directory in interactive development environments like Jupyter Notebook?
I'm having trouble with managing the working directory in Jupyter Notebook. For example, I have a .py script that requires me to change the working directory to its directory to run it properly. I've ...
0
votes
2
answers
271
views
How to implement a server application that can reload configuration without restart
I have a game server implemented in Python to which clients can connect and play against each other.
I'd like to be able to reload configuration from a config file without restarting the server (as ...
5
votes
2
answers
522
views
In a python project, when should you use __init__.py, __main__.py, and just normal .py?
Say I am making a pdf editor app with the following structure:
├── main.py
├── 📂 drawing_functions/
├── 📂 util/
├── 📂 GUI/
└── 📂 document_handling/
Each of these folders have a collection of ...
5
votes
5
answers
589
views
How to test for performance regression?
I am working on a refactor on a certain package (I can give details if asked). The package involves a clever lazy evaluation of a sort of nested sequence of arithmetic operations. If the numerical ...
0
votes
1
answer
197
views
Best practice when declaring imports with different execution contexts in python?
Say I have a Python project that looks like this:
project/
├── package/
│ ├── __init__.py
│ ├── module1.py
└── main.py
I would like package/ to be self-contained, though it is called from main.py....
5
votes
2
answers
689
views
Why did Python designers decide not to declare vars? [closed]
In Python when you want a local variable, you just assign to it x = 10.
In most modern languages you declare local vars (regardless of type):
JavaScript: let/const/var
Swift: let/var
Kotlin: val/var
...
1
vote
2
answers
449
views
Should an API client class be reusable?
For an API client I am working on, I was wondering, whether the main class should be reusable. This question basically boils down to: should the HTTP client be instantiated in __init__ or __enter__/...
0
votes
0
answers
50
views
Simple packaging for multi-file/module Python deployments
I'm working on a Python codebase which we are trying to improve the modularity of. Both the top level scripts and the modules that they depend on are all in one main repo. We have another repo which ...
-3
votes
2
answers
4k
views
Is it better practice to set default values for optional argparse arguments?
I mention python's argparse as an example but this would apply to any CLI argument parser library for any language. Just generally speaking, at a high level, if there are a lot of optional arguments ...
1
vote
1
answer
324
views
Separation of concerns between business layer, data layer and presentation layer without losing information
I'm developing an api in Fast API using sqlalchemy to manage my ORM classes and operations with the database.
I'm dealing with some design decisions to have my classes as little coupled as possible ...
- The Overflow Blog
-
-
- Upcoming Events
-
2025 Community Moderator Electionends August 13
- Featured on Meta
-
-
-
Related Tags
object-oriented × 158
design × 157
design-patterns × 132
python-3.x × 98
django × 83
coding-style × 76
java × 76
architecture × 68
unit-testing × 67
algorithms × 64
javascript × 56
c++ × 55
testing × 41
web-applications × 41
web-development × 39
exceptions × 37
php × 37
functions × 35
c × 34
class × 33
database × 33
api-design × 32
more related tags
Hot Network Questions
- Advantage of launching a rocket from the Equator
- EU/USA trade deal - is it really a done deal?
- Is it ethical to hire a graphic designer for a job talk?
- Was the Silk Road really a conduit of ideas?
- What is known about the third time derivative of the expansion of the Universe?
- Hill Estimator for SkewStudentT is Biased
- Short story about a scientific rivalry that leads to madness
- Why did many arcade games have separate sound CPUs?
- CCZ magic state teleportation
- Why RewriteRule behaves different if request URL has a trailing slash and when not?
- Is it common practice to run neutral and ground to the same bar?
- General Two-dimensional Elliptical Gaussian Image Generator in C++
- Has the similarity between diagrams of the expanding universe and of vapour pressure in mixtures been noted by others? Is this just coincidence?
- Can a body part of a defeated monster act as an associated object for the Teleport spell to find a creature's lair?
- Uniqueness of multiple unnamed namespaces within translation unit
- If Satan is not omnipresent, how can he tempt or test multiple people at the same time in different places?
- How many possible MD5 hashes are there, 16³²? Or do MD5 checksums have error correction (in which case <16³² possible hashes)?
- Right size rim tape when converting MTB to tubeless
- Stepping down voltage from Li-ion to simulate 2x AAA batteries
- Taking small amounts till there's nothing left
- Visa Free Transit Facility (VFTF): Indian passport but resident in Saudi Arabia
- Pokémon movie where Team Rocket is floating in calming water
- How can I secure an old iron gate with a padlock?
- How should I talk about definitional uncertainty in seemingly well-defined measurands, arising at high resolutions?