Movatterモバイル変換


[0]ホーム

URL:


Sorry, we no longer support your browser
Please upgrade toMicrosoft Edge,Google Chrome, orFirefox. Learn more about ourbrowser support.
Skip to main content

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities includingStack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Loading…
Software Engineering

Questions tagged [python-3.x]

Ask Question

Python 3 is the latest version of the Python programming language and was formally released on December 3rd, 2008.

156 questions
Filter by
Sorted by
Tagged with
5votes
2answers
739views

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):#"/questions/tagged/python" title="show questions tagged 'python'" aria-label="show questions tagged 'python'" rel="tag" aria-labelledby="tag-python-tooltip-container" data-tag-menu-origin="Unknown" itemprop="keywords">python
noamtm's user avatar
-3votes
2answers
5kviews

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 ...
notacorn's user avatar
1vote
3answers
626views

I have reviewed this, but it doesn't seem to address what I'm asking here.https://stackoverflow.com/questions/15727420/using-logging-in-multiple-modulesI want to have multiple programs call the same ...
NealWalters's user avatar
1vote
0answers
65views

As a toy problem for learning Django, I am trying to create a simple web app that tracks encounters and initiative for one of my D&D campaigns. I have a database with models for combatants:class ...
Brandon Smith's user avatar
2votes
3answers
457views

This is a conceptual question about whether my specific use-case warrants the use of an asynchronous API.Language: Python 3.11Framework: FastAPI (ASGI)I believe I am confused about what an ...
nonohat's user avatar
0votes
2answers
360views

I'm using argparse.ArgumentParser extensively; however, it comes with a lot of boilerplate to set up, and this is especially noticeable when you've got more than a few common arguments that probably ...
0votes
1answer
232views

I am currently developing an application in Python that has a match making functionality to form sports teams of 4 and group them by skill. The following has been implemented and works.E.g.Form ...
serge's user avatar
1vote
0answers
95views

I have the following piece of code. Line 1 is a container (for simplicity, one can think of it as a list of elements e1, e2, ..., en). Now there is a function function_fun which takes as input an ...
A J's user avatar
  • 19
2votes
2answers
170views

Consider the following python3 code:from abc import ABC, abstractmethodclass Food(ABC): _food_factory_map = {} _recipes = {} @classmethod def getFood(cls, foodName): return ...
1vote
2answers
1kviews

I'm working on a python library for a REST API.I'm using python data classes to represent the structure of the returned JSONThe v2 of this API returns a slightly different object when compared to v1....
rsn's user avatar
  • 127
1vote
0answers
1kviews

I'm working on a python wrapper for a REST API. I'm using python data classes to store the shape of the JSON response of each endpoint so developers have features like autocomplete and objects they ...
rsn's user avatar
  • 127
21votes
6answers
7kviews

In Python 3, I subclassed int to forbid the creation of negative integers:class PositiveInteger(int): def __new__(cls, value): if value <= 0: raise ValueError("value ...
-2votes
1answer
91views

Here's what I want to achieve:while complex_compound_condition_statement: foobar() # ... do some stuffI would like the log output of the above to be:<timestamp> INFO: started doing stuff ...
user247243's user avatar
2votes
1answer
4kviews

I have a class that I use to define different types of plots I am performingclass MyPlots(Enum): STANDARDSCALE = "standard" LOGSCALE = "log"there are default values ...
5votes
1answer
365views

I am a very beginner writing one of my first webapps. I'm using FastAPI and I'm stuck on the logic of creating an endpoint that has to do a lot of things before it returns something back to the user. ...

153050per page
1
2345
11

Hot Network Questions

more hot questions
Newest python-3.x questions feed

[8]ページ先頭

©2009-2025 Movatter.jp