1
0
mirror of https://github.com/satwikkansal/wtfpython synced 2024-11-24 20:14:23 +01:00
Commit Graph

325 Commits

Author SHA1 Message Date
Joachim Strömbergson
9ff40de544
'less than 21' is the correct expression. Could slso be 'less or equal to 20'. 2020-05-02 08:54:24 +02:00
Yonatan Goldschmidt
67f743eddd Correctify explanation of Stubborn del operation 2020-03-24 23:12:47 +02:00
myrmica-habilis
78cb5f39f5 Update README.md
- assignment expressions are evaluated and printed by the REPL
2020-03-20 11:00:29 +01:00
Satwik Kansal
e9b04d33f7
Merge pull request #181 from Haksell/correct-six-typos
Correct six typos
2020-02-16 02:31:40 +05:30
Pradhvan
184df9f99d README.md: Update Python version in 'Modifying a dictionary while iterating over it' example 2020-02-15 14:30:05 +05:30
Haksell
a4af8a4e0c Correct six typos 2020-02-15 09:04:24 +01:00
Haksell
50265e91fc Correct six typos 2020-02-15 09:03:08 +01:00
Satwik Kansal
6cebc952c3
Fix minor typo in the "is not" example 2020-01-20 14:23:20 +05:30
Satwik Kansal
bd7cd4334c
Merge pull request #175 from larsks/fix/is-not
Extend the explanation of the "is not ..." section
2020-01-20 14:20:57 +05:30
Satwik Kansal
97c10e6fda
Merge pull request #177 from larsks/fix/quotes
Clarify for quoting examples
2020-01-20 14:20:22 +05:30
Satwik Kansal
8e6c850f30
Merge pull request #178 from larsks/fix/bad-logic
Fixed logic error in "Beware of default mutable arguments!"
2020-01-20 14:18:41 +05:30
Satwik Kansal
e74ccb79d0
Merge pull request #176 from larsks/fix/grammar
A minor grammar correction
2020-01-20 14:17:48 +05:30
Lars Kellogg-Stedman
16c90f9b24 Fixed logic error in "Beware of default mutable arguments!"
The example showing how using None as a default argument is used
instead of a mutable default argument had reversed logic.  It would
set default_arg to [] whenever the caller passed a non-None argument.
2020-01-19 12:03:30 -05:00
Lars Kellogg-Stedman
3e99005ae4 Clarify for quoting examples
The example of the use of backslash to escape a double-quote makes
more sense when used inside a double-quoted string. If the string is
quoted with single quotes, one could of course just write 'wt"f'
withouth requiring any escaping.
2020-01-19 10:19:17 -05:00
Lars Kellogg-Stedman
8370f3a3b9 A minor grammar correction 2020-01-19 10:16:47 -05:00
Lars Kellogg-Stedman
f20be4cfc4 Extend the explanation of the "is not ..." section
I thought that the explanation for "'something' is (not None)" could
be a little more explicit.
2020-01-19 10:13:50 -05:00
Lars Kellogg-Stedman
00a1228ca3 Fix spelling (found -> find)
Noticed a minor spelling error while reading through this fantastic
document.
2020-01-19 10:04:41 -05:00
Satwik Kansal
de113d2491
Merge pull request #170 from art049/master
Wild imports typo
2020-01-12 00:34:12 +05:30
Antoine Rozo
5f8067df42 Fix explanation for 6th example of "Needles in a Haystack" 2020-01-10 14:39:29 +01:00
Arthur Pastel
30a6623ccd
Wild imports typo 2020-01-10 12:43:16 +01:00
Kerollos Magdy
d1a4144143
Fix issue creating link 2020-01-09 13:12:14 +02:00
Chris Guo
43679ebd1e fix: fix example input error 2020-01-08 00:09:25 +08:00
Satwik Kansal
0d65c00bb6
Merge pull request #166 from louisguitton/patch-1
Fix typo in 'Strings can be tricky sometimes'
2020-01-06 19:39:21 +05:30
Nick Muoh
68f6e0217c
Fixed mispelling 2020-01-04 19:49:32 -05:00
Louis Guitton
3d64252310
Fix typo in 'Strings can be tricky sometimes' 2020-01-04 17:16:09 +01:00
Satwik
185d60c1b6 Update hash brownies explanation and the logical order of few examples.
Addresses https://github.com/satwikkansal/wtfpython/pull/76
2019-12-31 16:10:45 +05:30
Satwik Kansal
1b3b2e6c71
Fix typo
Closes https://github.com/satwikkansal/wtfpython/issues/165
2019-12-30 19:20:31 +05:30
Satwik Kansal
f98bd4363f
Fix typo
Closes https://github.com/satwikkansal/wtfpython/issues/164
2019-12-30 13:05:38 +05:30
Satwik
2c910351b7 Fix relevant typos detected by codespell
Closes https://github.com/satwikkansal/wtfpython/issues/161
2019-12-27 20:05:17 +05:30
Satwik
9a2718ae3a Fix typo
Closes https://github.com/satwikkansal/wtfpython/issues/162
2019-12-27 20:05:17 +05:30
Rahul Gopinath
2f2fcf87bc
Make sure that default_arg is not passed rather than checking for falsity
```
if not default_arg:
    ...
```
fails when `default_arg` can be assigned and still be false (implementing a `__bool__` or `__len__` etc). You dont want to overwrite the passed values.
2019-12-25 10:10:53 +01:00
Satwik Kansal
99280f57a0
Merge pull request #159 from boppreh/patch-1
Update README.md
2019-12-25 01:23:18 +05:30
Satwik
7c85a73442 Move discussion thread links to the links section 2019-12-25 00:09:55 +05:30
BoppreH
e4f340281c
Update README.md
Fix incorrect output for f-string.
2019-12-24 14:02:22 -03:00
Satwik
6c0ed6e7c5 Add discussion links 2019-12-24 21:47:59 +05:30
Satwik
dcc2e6a3d8 Update links 2019-12-24 20:09:12 +05:30
Satwik
a1b4f8d521 Put the pdf link back on demand 2019-12-23 23:13:08 +05:30
puɐloɹ ʇɹǝqƃǝᴉs
73a1248d04
Fix typo in dictionary section 2019-12-23 16:31:44 +01:00
Satwik
a39792bd4b Remove kofi link 2019-12-23 16:27:27 +05:30
Satwik
bd45175405 Point colab notebook to the master 2019-12-23 15:59:59 +05:30
Satwik Kansal
ad39ef8625
Merge pull request #155 from yaph/patch-1
Make hashtags in Twitter link work
2019-12-23 15:33:22 +05:30
Saverio Miroddi
e35642ed05 Correct some typos
Corrected a handful of typos.
2019-12-23 10:31:40 +01:00
Ramiro Gómez
f8aa17c8ba
Make hashtags in Twitter link work
Change URL parameter from `hastags` to  `hashtags`.
2019-12-22 21:11:25 +01:00
Satwik
76d98d9138 Fix line break 2019-12-21 22:12:56 +05:30
Satwik
d59db75b4c Add link to other modes 2019-12-21 22:11:55 +05:30
Satwik
734360ff59 Add team trees 2019-12-21 20:38:18 +05:30
Satwik
483496d97a Aesthetical changes 2019-12-21 20:00:21 +05:30
Satwik
12b2fc008e Fix TOC and links 2019-12-21 19:39:28 +05:30
Satwik
56c0347dd1 Minor correction 2019-12-20 23:56:35 +05:30
Satwik
7006084c12 Fix URLs 2019-12-20 23:39:10 +05:30
Satwik
9fb381c4f3 Fix soo many typos, sigh. 2019-12-20 02:05:53 +05:30
Satwik
68904d3f6f Remove mention of npm package 2019-12-20 01:13:18 +05:30
Satwik
f30181a54e Merge remote-tracking branch 'origin/master' into 3.0 2019-12-20 00:52:52 +05:30
Satwik
ef68d1b482 Add markers for new content 2019-12-20 00:27:21 +05:30
Satwik
8522964105 Read only meta tag, and minor fixes 2019-12-19 21:47:20 +05:30
Satwik
f3c7afebd7 Minor corrections 2019-12-19 15:49:52 +05:30
Nikita Sobolev
e899e38553
Adds wemake-python-styleguide
Link: https://github.com/wemake-services/wemake-python-styleguide
Docs: https://wemake-python-stylegui.de/en/latest/
2019-12-01 15:51:18 +03:00
Satwik
d9e71224e2 Add minor example 2019-11-07 17:27:52 +05:30
Satwik
888c9e1261 Fix indenting, add a minor example, and update contributing message 2019-11-04 23:18:52 +05:30
Satwik
2cd7e3fccd Fix broken links 2019-11-03 00:54:04 +05:30
Satwik
321e7196d0 Some change of example orders 2019-11-02 23:02:47 +05:30
Satwik
a553ea0070 Some meta tags and corrections after running on Python 3.8 2019-10-31 23:50:23 +05:30
Satwik
7df49cd818 Change section name to Slippery Slopes and modify nan-reflexivity example 2019-10-31 00:51:48 +05:30
Satwik
af6d1799d9 Add more details to compile time optimisation snippets. 2019-10-30 23:24:07 +05:30
Satwik
5bf46f66af Bring compiler optimisation stuff back, and add minor updates. 2019-10-30 23:04:50 +05:30
Satwik
312c5d542c Add non reflexive class method and the matmul operator examples 2019-10-30 01:03:07 +05:30
Satwik
4af4f9debf Add more examples 2019-10-29 23:53:42 +05:30
Satwik
b10b3ad346 Add another needle-like example
Closes https://github.com/satwikkansal/wtfpython/issues/137
2019-10-29 22:31:58 +05:30
Satwik
133baac11c Add minor snippet related to output buffer flushing
Closes https://github.com/satwikkansal/wtfpython/issues/140
2019-10-29 22:31:58 +05:30
Satwik
34e97d53fb Add example related to the Walrus operator
Closes https://github.com/satwikkansal/wtfpython/issues/145
2019-10-29 01:07:28 +05:30
Satwik
bd798f2966 Update alignment 2019-10-28 22:51:03 +05:30
Satwik
ce8adb0417 Update TOC 2019-10-28 22:48:15 +05:30
Satwik
28bcbfd311 More changes to order and aesthetics 2019-10-28 22:40:32 +05:30
Satwik
82c37ccb32 Perhaps some editing 2019-10-28 22:17:26 +05:30
Satwik
43355e2498 Merge branch 'master' into 3.0 2019-10-28 19:34:20 +05:30
Satwik
45a2cb5ddd Merge remote-tracking branch 'origin/3.0' into 3.0 2019-10-28 19:30:53 +05:30
monujee
bef3f2a33d
Update README.md
Typo corrected.
2019-10-25 14:28:25 +05:30
Satwik Kansal
f8acf49d05
Update README.md 2019-10-09 18:48:41 +05:30
mitcom
d143f972b8 Add space-invader operator case 2019-10-06 13:12:35 +02:00
Satwik Kansal
6223715725 change order 2019-09-13 15:25:57 +05:30
Satwik Kansal
2a1c28ee4d Fix toc 2019-09-13 15:25:57 +05:30
Satwik Kansal
d6b735768c Remove asterisks and carets from titles 2019-09-13 15:24:43 +05:30
Satwik Kansal
e8fcce27c2 Fix uuid comments 2019-09-13 15:24:01 +05:30
Satwik Kansal
45638fa6b1 Add uuids to examples 2019-09-13 15:24:01 +05:30
Satwik Kansal
162458c88e Update TOC 2019-09-13 15:24:01 +05:30
Satwik Kansal
edeb98f406 Update the booleans example
Fix some technically incorrect terminologies and snippets.
2019-09-13 15:22:40 +05:30
Satwik Kansal
9939ff6a1f Add new example: Wild imports 2019-09-13 15:22:40 +05:30
Satwik Kansal
6934d94222 Some minor changes, and add assertion example 2019-09-13 15:22:01 +05:30
Satwik Kansal
7b22f84f97 Add new example: Disorder within order
Resolves https://github.com/satwikkansal/wtfpython/issues/77
2019-09-13 15:21:05 +05:30
Satwik Kansal
055bd0246d New example: Lossy zip of iterators
Resolves https://github.com/satwikkansal/wtfpython/issues/121
2019-09-13 15:21:05 +05:30
Satwik Kansal
330f7da1d3 String can be tricky: Remove outdated snippet
Related to https://github.com/satwikkansal/wtfpython/issues/120
2019-09-13 15:21:05 +05:30
Satwik Kansal
ae05101d70 Brace yourself: Add to explanation
Resolves https://github.com/satwikkansal/wtfpython/issues/114
2019-09-13 15:18:48 +05:30
Satwik Kansal
2295fb24b7 Let's make a giant string: Use %timeit for measuring time
Fixes https://github.com/satwikkansal/wtfpython/issues/106
2019-09-13 15:18:48 +05:30
Satwik Kansal
f365271df3 New example: The chicken-egg problem
Closes https://github.com/satwikkansal/wtfpython/issues/101
2019-09-13 15:18:48 +05:30
Satwik Kansal
9b3b367b45 Update example "is is not what it is"
Related to https://github.com/satwikkansal/wtfpython/issues/100
2019-09-13 15:18:48 +05:30
Satwik Kansal
5373d0f184 Add example: Ellipsis
Resolves https://github.com/satwikkansal/wtfpython/issues/96
2019-09-13 15:18:48 +05:30
Satwik Kansal
89c56c2366 Let's meet Friendly Language Uncle For Life: Add notes for non-interactive evn
Resolves https://github.com/satwikkansal/wtfpython/issues/94
2019-09-13 15:18:48 +05:30
Satwik Kansal
e3118ed4da Add new snippet: Splitsies
Resolves https://github.com/satwikkansal/wtfpython/issues/80
2019-09-13 15:18:48 +05:30
Satwik Kansal
f3b96e4d7f Expand strings and backslashes
Resolves https://github.com/satwikkansal/wtfpython/issues/69
2019-09-13 15:18:48 +05:30
Satwik Kansal
a0832c4459 Modifying a dictionary while iterating over it: Add note
Resolves https://github.com/satwikkansal/wtfpython/issues/53
2019-09-13 15:18:48 +05:30