Boris Verkhovskiy
0aceb41100
[python/*] remove feedback email request
2024-04-07 03:54:02 -07:00
Boris Verkhovskiy
3e687f1a8c
Remove leading and trailing empty lines in code blocks
2024-04-06 08:33:50 -07:00
Boris Verkhovskiy
fbf132752b
Merge branch 'master' into patch-1
2024-04-03 04:31:13 -07:00
bkkavin
e268272771
typo in learn x in y minutes python page ( #4812 )
2023-12-18 16:30:36 +01:00
Mohammed Ashour
05aa44a041
[python/en] adding an example for closures in python where we use the nonlocal
… ( #4033 )
...
* adding an example for closures in python where we use the `nonlocal` keyword
Adding an example for the case of nested functions with closure scopes, when we use the python 3s keyword 'nonlocal' to point to the variables in the outer functions
* Formatting Comments
2023-12-14 19:58:53 +01:00
Carlos Tafur
9e87e133a3
Update python.html.markdown ( #4228 )
...
I read somewhere that conventions in naming variables are snake_case and camelCase.
2023-12-14 16:23:10 +01:00
Stanislav (Stanley) Modrak
0a0b3555d5
Clarify args and kwargs
2023-09-21 17:26:42 +01:00
Stanislav (Stanley) Modrak
38bf258ad8
Fix incorrect expression description
2023-09-20 12:51:11 +01:00
triumphantomato
4c6be14b8a
Update expected results for ceil and floor ( #4747 )
...
ceil and floor return ints not floats - check in repl or the python3 docs here: https://docs.python.org/3/library/math.html
2023-09-08 13:31:15 +08:00
triumphantomato
e9f263a75f
[python/en] add hint about leading underscore indicating internal use ( #4748 )
2023-09-08 13:30:31 +08:00
triumphantomato
7b2491ecd5
[python/en] Updated Decorator and wrapping explanation ( #4749 )
...
Now it includes motivation, an explanation of functools.wraps, and demonstrates the utility of wrapping.
2023-09-08 13:29:58 +08:00
Stanislav (Stanley) Modrak
73584a2e27
Clarify "Method Resolution Order" ( #4687 )
2023-08-25 11:52:13 +08:00
Stanislav (Stanley) Modrak
4c79407041
Merge branch 'master' into patch-4
2023-03-08 09:35:48 +00:00
John Paul Wohlscheid
97806f674f
removed tutorial that no longer exists
2023-02-15 13:26:47 -05:00
Marcel Ribeiro Dantas
4d6309b2bd
Add missing json import
2022-12-01 19:29:50 -03:00
Norwid Behrnd
3d0ea351cb
remove overly long lines by edit of content
...
Light rephrasing to stay within the constraint of 80 chars/line.
The cross links at the end of the document are not affected.
2022-11-08 13:36:41 +01:00
Norwid Behrnd
0dcfdfb4b4
remove overly long lines by additional line breaks
...
The threshold of a line considered as too long is 80 characters
per line. Changes introduced only alter the use of line breaks.
2022-11-08 12:50:57 +01:00
Stanislav (Stanley) Modrak
25e194aa0f
Update python.html.markdown
2022-10-26 19:30:44 +01:00
Stanislav (Stanley) Modrak
610676c76e
Update python.html.markdown
2022-10-26 18:37:42 +01:00
Stanislav (Stanley) Modrak
c86c82f4b5
Update python.html.markdown
2022-10-26 18:36:17 +01:00
Stanislav (Stanley) Modrak
e3ee5b81fa
Update python.html.markdown
2022-10-26 18:07:08 +01:00
Gregory Inouye
52617d5c82
remove duplicate truthy falsy explanation
2022-10-20 11:56:59 -07:00
Stanislav (Stanley) Modrak
6c2c6b1076
Clarify casting and move bool() method section
2022-08-28 18:45:40 +01:00
Stephan Spindler
adc474c4c9
Add sets to empty things that are false
2022-07-27 21:38:53 +02:00
Tanay Parikh
247dc6e86c
Python Update open
File Open mode
...
Per https://docs.python.org/3.7/library/functions.html#open , the `+` is for `open a disk file for updating (reading and writing)`. Per the example, if we're looking to just read/write, the `+` isn't necessary.
2022-06-19 11:33:07 -07:00
benjaminjamesrussell
2c8b419c54
Update python.html.markdown ( #4257 )
2021-10-28 00:29:54 +02:00
krotera
4076d78e26
Fix tiny typos
2021-01-15 17:44:19 -05:00
谭九鼎
4ab2666343
Update links
2020-10-20 18:40:07 +08:00
谭九鼎
ad92cb8d76
[python/en] some clean up, add a Modulo example
2020-10-20 18:38:26 +08:00
Angeo Rohit
141eaec78c
[python/en] Update class example on invoking static methods from class instance.
2020-10-01 01:03:57 +08:00
kevinnls
c39746b0bb
improved demo of if
expression
2020-08-05 17:33:57 +05:30
Max Schumacher
3afac7ea62
Merge pull request #3953 from sumanstats/master
...
[language/raku-code] Perl6 to Raku and many more
2020-07-07 15:28:05 +02:00
sumanstats
d78605e0d7
Reflect perl6 to raku rename
...
+ As mentioned here: https://github.com/Raku/problem-solving/blob/master/solutions/language/Path-to-Raku.md perl6 is renamed to raku
+ change references of perl6 to raku
+ change extension from .p6 to .raku
+ fix the link of raku advent calendar
2020-06-15 20:42:57 +05:45
Kuv
d56323d08e
Change string access example for clarity
...
'T' was apparently mistaken by someone for True, so this is a minor edit to use a different example to make sure that doesn't happen again.
2020-06-04 12:41:35 +05:30
amigos-maker
55ad60b7dd
Update python.html.markdown
...
added useful links
2020-05-26 18:11:58 -07:00
Adam Bard
7539720f13
fix en python again
2020-02-13 22:11:29 -08:00
Adam Bard
f63a137656
fix en python language
2020-02-13 22:06:16 -08:00
Simon Shine
ae848c481f
Python 3: Use 'filename: learnpython*.py' (no '3')
...
Before renaming, Python 3 filenames were 'learnpython3*.py'.
This commit removes the '3' part from the filename.
To verify that the filenames were named consistently across
translations prior to this commit, and to change this:
```
ack -H 'filename:' python.html.markdown
find . -name "python-*.markdown" -exec ack -H 'filename:' {} \;
sed -i 's/^filename: learnpython3/filename: learnpython/' \
python.html.markdown
find . -name "python-*.markdown" -exec \
sed -i 's/^filename: learnpython3/filename: learnpython/' {} \;
```
2020-02-12 07:04:42 +01:00
Simon Shine
efe00fd06e
Switch links: 'python3 <-> python' and 'python <-> pythonlegacy'
...
The list of references is exhausted by running 'ack docs/python'.
2020-02-12 05:03:08 +01:00
Simon Shine
a3b0585374
Rename Python 3 markdown files into 'python'
...
```
for f in $(find . -iname "*python3*" | grep -vE 'git'); do
fnew=$(echo "$f" | sed 's/python3/python/')
git mv "$f" "$fnew"
done
2020-02-12 04:54:36 +01:00
Simon Shine
1adab9bc3f
Rename Python 2 markdown files into 'pythonlegacy'
...
```
for f in $(find . -iname "*python*" | grep -vE 'python3|git|statcomp'); do
flegacy=$(echo "$f" | sed 's/python/pythonlegacy/')
git mv "$f" "$flegacy"
done
```
2020-02-12 04:53:08 +01:00
Streppel
cbcb987c53
[python/py3] Updating set info ( #3473 )
...
Updating set info to be more descriptive and informative
2019-02-16 23:37:14 +05:30
Anindya Srivastava
fa9f9fd563
Type correction for the output of math.sqrt()
...
Both in Python 2.7.10 and Python 3.6.5, math.sqrt() returns a float and not int. It seems like a tiny thing but sometimes may lead up to bigger confusions. For example: https://stackoverflow.com/questions/54474037/why-are-the-following-codes-giving-me-different-output-square-root-big-numbers/54475501#54475501
2019-02-01 21:55:22 +05:30
Rommel Martinez
60fcfe8662
[python/en]: fix typo
2018-02-03 17:28:21 +08:00
Meisyarah Dwiastuti
3ffb8256ae
Add data type checking examples
2017-10-31 09:54:09 +01:00
Ian Bertolacci
6ec7fdc16b
[python/en] filled_dict
...
Address #2841
2017-09-07 13:26:46 -07:00
Amin Bandali
dba32328ee
Update my site's address ( #2712 )
2017-04-27 13:19:17 +02:00
Evan
b4ca1f76e2
Python decorators example added ( #2408 )
2017-02-09 16:57:30 +01:00
Adam Bard
79004c5b4a
Merge pull request #2571 from Smosker/patch-1
...
[python/en] Fix a bug
2017-02-01 13:56:43 -08:00
David Haberthür
4737819e5d
Made the file pep8
compliant ( #2601 )
...
Actually nearly compliant, I ran `pep8 code.py --ignore=E402,E501,E712`
2016-12-20 15:04:12 +01:00