Talk:Python (programming language)
<templatestyles src="Module:Message box/tmbox.css"/><templatestyles src="Talk header/styles.css" />
| This is the talk page for discussing improvements to the Python (programming language) Script error: No such module "pagetype".. This is not a forum for general discussion of the article's subject. |
Article policies
|
| Template:Find general sources |
| Archives: Template:Comma separated entries<templatestyles src="Template:Tooltip/styles.css" />Auto-archiving periodScript error: No such module "Check for unknown parameters".: Template:Human readable duration File:Information icon4.svg |
Script error: No such module "Check for unknown parameters".Script error: No such module "Check for deprecated parameters".
Template:ArticleHistory Script error: No such module "Banner shell". User:MiszaBot/config Script error: No such module "English variant notice".
GA reassessment
{{Wikipedia:Good article reassessment/Python (programming language)/1}}
Ease of Learning
- Template:Not done unclear Merely pasting text onto a talk page will not get anything done. Is this a change that you want to see incorporated into the article? Please be specific about the change(s) that you want. Peaceray (talk) 17:10, 16 December 2024 (UTC)
Syntax for Beginners
- Print Function: Python uses the
print()function to output data to the console. Unlike many languages, Python does not require semicolons at the end of statements, making it more readable. - Variable Assignment: Python is dynamically typed, meaning variables are assigned values directly without the need to declare their type. The type is inferred based on the assigned value. Example:
name = "JadPythonWiki" - Indentation: Python uses indentation, rather than braces
{}, to define blocks of code. Indentation must be consistent to avoid errors, making Python code clean and readable. - Input: Python uses the
input()function to receive user input. By default, the input is returned as a string, which can be converted to other types if necessary. - Comments: Python supports single-line comments, which begin with the
#symbol. Comments are ignored by the interpreter and are used to document the code. - Function Definition: Functions in Python are defined using the
defkeyword, followed by the function name and parameters in parentheses. Python functions can return values using thereturnstatement.
- Template:Not done unclear Merely pasting text onto a talk page will not get anything done. Is this a change that you want to see incorporated into the article? Please be specific about the change(s) that you want. Peaceray (talk) 17:10, 16 December 2024 (UTC)
"Pyston" listed at Redirects for discussion
File:Information.svg The redirect Pyston has been listed at redirects for discussion to determine whether its use and function meets the redirect guidelines. Readers of this page are welcome to comment on this redirect at Template:Section link until a consensus is reached. Duckmather (talk) 02:32, 6 February 2025 (UTC)
Plan for Future Edits
- Adding more examples showcasing different paradigms
We could provide Python examples of list comprehensions, lambda functions, map, filter, reduce in a functional programming context.
- Show graph or data of Python popularity in relation to other languages
- Show examples of using performance optimization tools with Python like Numba, Cython, and PyPy
- Running experimental support for running in a free-threaded mode
MadHanSolo (talk) 18:23, 26 March 2025 (UTC)
- Hi
- REDIRECT Template:Reply to
Template:Redirect category shell. Please feel free to add if you think that makes sense. However, keep in mind that Wikipedia is not a Howto or a set or tutorials so if the code examples become too large, they are likely to get deleted. --McSly (talk) 18:34, 26 March 2025 (UTC)
- Hi @MadHanSolo, I can work towards adding in a brief section of performance optimization taking into account the advice from @McSly about examples. I was briefly going to cover Just-In-Time Compilation, Static Compilation, Concurrency and Parallelism, and Efficient Data Structures. Chbeast (talk) 20:15, 29 March 2025 (UTC)