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

171 Commits

Author SHA1 Message Date
Satwik Kansal
fc262f2444 Fix broken TOC links 2018-01-26 11:22:50 +05:30
Satwik Kansal
98ef2dad4a Reorder the sections 2018-01-26 00:13:40 +05:30
Satwik Kansal
86462ed1e5
Update README.md 2018-01-25 21:13:04 +05:30
Satwik Kansal
9d713f0fa5
Fix formatting 2018-01-25 20:45:14 +05:30
Satwik Kansal
79d396a1fb Update description 2018-01-23 15:34:06 +05:30
Satwik Kansal
054e88f7b2 Change case 2018-01-23 14:42:45 +05:30
Satwik Kansal
674fc891b4 Add figure related to string intern 2018-01-23 14:40:49 +05:30
Satwik Kansal
9ac6470efc Add logo image 2018-01-23 14:33:49 +05:30
Satwik Kansal
b362cc9d0a Add new links 2018-01-23 14:31:31 +05:30
Satwik Kansal
601d1e4396 Update section names 2018-01-22 19:35:37 +05:30
Satwik Kansal
86f4b67525 Fix broken TOC 2018-01-22 19:33:01 +05:30
Satwik Kansal
4ab6e94f03 Change title 2018-01-22 19:21:10 +05:30
Satwik Kansal
dc2dc3528a Add one line description for the sections. 2018-01-22 19:17:01 +05:30
Satwik Kansal
2ef3b8bbfc Fix typ 2018-01-22 18:51:58 +05:30
Satwik Kansal
502769882a Update to the new awesome generated doc 🎉 2018-01-22 18:49:09 +05:30
Satwik Kansal
12ba09b40b Slight modifications in the description 2018-01-22 18:49:09 +05:30
Satwik Kansal
dc9387effa Add a note about asterisk 2018-01-22 18:49:09 +05:30
Satwik Kansal
3b956caba2 Update contributing guidelines 2018-01-22 18:49:09 +05:30
Satwik Kansal
a253ec4cda Fix a hell lot of typos 2018-01-22 18:49:09 +05:30
Satwik Kansal
852bdc3d32 Update usage instructions 2018-01-22 18:49:09 +05:30
Satwik Kansal
d325554921 * Fix .gitignore issue
* Add pypi package 🚀
2018-01-22 18:49:09 +05:30
Satwik Kansal
c979d82c1f Grammatical changes 2018-01-22 18:49:09 +05:30
Satwik Kansal
1032f356d5 Add pdf section 2018-01-22 18:49:09 +05:30
Satwik Kansal
92fa8039db Remove "Suggested by" from the examples.
* Because a major refactor of examples has to be done.
* Our awesome contributors are duly credited in the new CONTRIBUTORS.md
2018-01-22 18:49:09 +05:30
Satwik Kansal
7d667bb3fd Slightly update the description 2018-01-22 18:49:09 +05:30
Satwik Kansal
35057d4131 Update Acknowledgements section 2018-01-22 18:49:09 +05:30
Satwik Kansal
bf161dd0d2 update help section 2018-01-22 18:49:09 +05:30
Satwik Kansal
ba6870a46e Shots fired!y 2018-01-22 18:49:09 +05:30
Satwik Kansal
33b38f1835 More examples and easter eggs.
Damn, this is going to be awesome!!!
2018-01-22 18:49:09 +05:30
Satwik Kansal
e2e8e42d52 Update backslash example 2018-01-22 18:49:09 +05:30
Satwik Kansal
491a98e478 Add one more statement to explanation snippet 2018-01-22 18:49:09 +05:30
Satwik Kansal
a13213dfeb Update broken link 2018-01-14 22:55:41 +05:30
Satwik Kansal
f220dd36e0 Update the description and add social links 2018-01-14 21:11:05 +05:30
Satwik Kansal
b743451660 Add new example: Tricky strings
Closes https://github.com/satwikkansal/wtfpython/issues/54
2018-01-11 22:17:27 +05:30
Satwik Kansal
1ec3c5e5e9 Dictionary modification: Add python versions in the output
Also adds a note explaining the reason behind it.

Related to https://github.com/satwikkansal/wtfpython/issues/54
2018-01-11 15:16:54 +05:30
Satwik Kansal
f1c2b68d32 Add new example: The stubborn del operator
Closes https://github.com/satwikkansal/wtfpython/issues/26
2018-01-11 14:13:17 +05:30
Satwik Kansal
e94cbea6bc Update TOC
Closes https://github.com/satwikkansal/wtfpython/issues/36
2018-01-07 15:05:44 +05:30
Satwik Kansal
2ef51ecb8f Add a lot of examples 2018-01-07 15:05:00 +05:30
Satwik Kansal
b624ed908d Update minor examples: Add one and remove one 2018-01-07 12:44:22 +05:30
Satwik Kansal
c84c827248 Add new example: Teleportation 2018-01-07 12:27:16 +05:30
Satwik Kansal
118f51d042 Add new example: Deep Down, we're all the same 2018-01-07 11:57:50 +05:30
Satwik Kansal
78a1218dbd Minor corrections in previous example 2018-01-07 11:27:23 +05:30
Satwik Kansal
7909c0b1ad Add example: Mangling time! 2018-01-07 11:25:34 +05:30
Satwik Kansal
0da5243425 Add new example: Subclass transitivity 2018-01-07 11:06:47 +05:30
Satwik Kansal
47e0fc86e6
Update README.md 2017-12-24 01:03:36 +05:30
Parth Laxmikant Kolekar
0ce64da2fd Update README.md
Typo fix
2017-10-20 23:01:40 +05:30
Satwik Kansal
41e9b72fea Add new snippet: Half quoted triple strings
Closes https://github.com/satwikkansal/wtfpython/issues/40
2017-10-11 22:47:59 +05:30
Satwik Kansal
ea29aa034d Update Example: Let's make a giant string
* Add another function `add_bytes_with_plus` actually illustrating
  quadratic behavior for the `+=` operator.
* Add explaination for linear behavior due to `+=` optimizations
  in case of strings.
* Change the order of examples (move string interning example just
  before the giant string example).

Closes https://github.com/satwikkansal/wtfpython/issues/38
2017-10-11 18:49:09 +05:30
Satwik Kansal
e2c2cf106b Add new snippet: Yielding None
Closes https://github.com/satwikkansal/wtfpython/issues/32
2017-10-11 17:44:42 +05:30
Satwik Kansal
2fff92ca56 Add gitter channel information and update TOC
Closes https://github.com/satwikkansal/wtfpython/issues/43
2017-10-11 15:58:22 +05:30
Valentin Samir
6f66e1e065 Fix typo, expression output True and not [[...]] 2017-10-03 16:50:39 +02:00
Satwik Kansal
e836b22a36 String concatenation optimizations: Update title
* Modifies the previously misleading title to be
more precise.

Related to https://github.com/satwikkansal/wtfpython/issues/38
2017-09-11 22:09:58 +05:30
Satwik Kansal
17a456adf1 Update contributing guide. 2017-09-11 21:52:45 +05:30
Satwik Kansal
76da1b8740 Skipping lines: Update explanation
* Add more accurate explanation
* Add more relevant example

Closes https://github.com/satwikkansal/wtfpython/issues/39
2017-09-11 21:41:00 +05:30
zed
0a70a2e645 add link to a more specific Stack Overflow thread
[What happens when you try to delete a list element while iterating over it](https://stackoverflow.com/questions/45946228/what-happens-when-you-try-to-delete-a-list-element-while-iterating-over-it)
2017-09-07 20:39:02 +03:00
sunqingyao
c2d42a5e52 Formatting 2017-09-07 16:52:34 +08:00
Jacob Mansfield
5d8a9e60c8
"Is not" description is too descriptive, changed title to "is not is not
is (not)"
2017-09-06 17:47:28 +01:00
Satwik Kansal
fa368e8caf Table Of Contents: Add entries
* Adds new examples to the table of contents.
2017-09-06 19:01:05 +05:30
Satwik Kansal
be98d88440 Add example: The surprising comma
Closes https://github.com/satwikkansal/wtfpython/issues/1
2017-09-06 16:40:38 +05:30
Satwik Kansal
cc3eb36f92 Minor Examples: Update explanation for multithreading example
* Clarifies that Python threads do run concurrently and are
  useful for I/O bound tasks.

Fixes https://github.com/satwikkansal/wtfpython/issues/30
2017-09-06 16:22:59 +05:30
Satwik Kansal
24c4a6469e Minor exmpample: Correct explanation
* `'a'[0][0][0][0][0]` is semanically correctly not because
  strings are iterables but because they are sequences as well.

Related to https://github.com/satwikkansal/wtfpython/issues/30
2017-09-06 16:22:59 +05:30
Satwik Kansal
5467a67f0f Add minor example
Adds an example to illustrate absence of
Increment and Decrement operators in Python.

Related to https://github.com/satwikkansal/wtfpython/issues/30
2017-09-06 16:22:59 +05:30
Beni Cherniavsky-Paskin
2155d917df italic literal *op=* 2017-09-06 11:30:25 +03:00
Beni Cherniavsky-Paskin
c95ba00160 a+=b vs a=a+b : clarify the difference is not universal
Made the text say it depends on class, and rest of explanation talk of lists, not objects.
2017-09-06 09:12:37 +03:00
Wiktor Żurawik
57fb82428b Fix typo in the "For what?" example 2017-09-05 12:27:29 +02:00
Satwik Kansal
753d0b6aae Add example: For what?
* Adds a new example
* Merges an existing example "Loop variable resilient to changes"
  in the explanation of this example

Closes https://github.com/satwikkansal/wtfpython/issues/23
2017-09-05 00:52:19 +05:30
Satwik Kansal
7e93e0cb91 Update example: Deleting a list while iterating over it
* Corrects the explanation for `del` keyword.

Fixes https://github.com/satwikkansal/wtfpython/issues/16
2017-09-05 00:05:07 +05:30
Satwik Kansal
d4a60ac9d0 Update example: Time for more Hash brownies!
Remove previously ambiguous explnanation and
add more explanatory and clear explanation.

Fixes https://github.com/satwikkansal/wtfpython/issues/10
2017-09-04 23:39:23 +05:30
Satwik Kansal
8216f02618 Update exmaple: Counting the booleans
* Changes name to "What's wrong with booleans"
* Add another snippet to the example.
2017-09-04 23:22:13 +05:30
Satwik Kansal
6abfb50fc6 Add example: Not Knot!
Related to https://github.com/satwikkansal/wtfpython/issues/1
2017-09-04 22:31:48 +05:30
Jason A. Ribeiro
a42587ffb7 Assign "2" to match remainder of class attribute example 2017-09-03 19:26:36 -04:00
Satwik Kansal
426cb0c2cb Use consistent "Explanation" headings.
Changes headings with just "#### Explanation:" to "#### 💡 Explanation"
Fixes https://github.com/satwikkansal/wtfpython/issues/22
2017-09-03 01:31:41 +05:30
Chandan Rai
31f617d4aa corrected typos 2017-09-02 17:39:50 +05:30
Sebastian Krzyszkowiak
8cf1148a41 Fix typo 2017-09-01 23:05:03 +01:00
Satwik Kansal
424b240acc Fix typo
Changes "shelll" to "shell".
2017-09-02 00:07:23 +05:30
Satwik Kansal
71b6e2812d Update Table Of Contents 2017-09-01 23:58:59 +05:30
Satwik Kansal
1b8d9ef06a Add new example: Counting the booleans
* Moves the "Booleans are subclass of int" example
from "Minor Ones" list to a new example.
2017-09-01 22:47:05 +05:30
Satwik Kansal
82bbded3da Change the position of the notes.
* Moves the position of the information regarding the
Python version so that it is not skipped by the readers.
* Also moves the position of the instructions for reproducing the
"Skipping lines" example to just below the output.

Closes https://github.com/satwikkansal/wtfPython/issues/17
2017-09-01 22:24:47 +05:30
Jeppe Pihl
bd05e9e723 Fixed wrong output of isinstance(False, float)
Fixed the output of `isinstance(False, float)` and changed `False` to `True` to match `isinstance(True, int)`
2017-09-01 15:13:09 +02:00
Satwik Kansal
4ae910baf3 Update Table Of Contents 2017-09-01 16:28:00 +05:30
Satwik Kansal
82b4ea20b2 Fix typos
* Changes "bord" to "board"
* Changes "some)func" to "some_func"
2017-09-01 02:36:46 -07:00
Eyal Zekaria
43a9c84bac Fix a couple of typos 2017-09-01 11:28:17 +02:00
Satwik Kansal
ba238cfa82 Add example: Loop variable resilient to changes
Closes https://github.com/satwikkansal/wtfPython/issues/11
2017-09-01 14:50:13 +05:30
Satwik Kansal
1a79352cc3 Update contributing section
* Link to CONTRIBUTING.md in the "Contributing" section
* Add couple of lines in CONTRIBUTING.md
2017-09-01 14:05:28 +05:30
Satwik Kansal
6cd006cd48 Skipping Lines: Add instructions to reproduce the exmaple 2017-09-01 13:58:39 +05:30
Satwik Kansal
86715d646e Add statement in output
Adds None==None statement in explicit string casting
example.
2017-09-01 13:52:18 +05:30
Satwik Kansal
8e69c66246 Correct ambiguous statement
* Removes the statement "So if the is operator returns True
then the equality is definitely True" because it contradicts
in case of float('nan')
* Adds a small example with explaination for the same.
2017-09-01 13:48:24 +05:30
Satwik Kansal
d91404dc69 Fix typo
Changes 0 to 0.0 in the output of explicit
string typecasting example.

Fixes https://github.com/satwikkansal/wtfPython/issues/13
2017-09-01 04:32:43 +05:30
Satwik Kansal
3256b04e73 Merge branch 'master' into patch-1 2017-08-31 15:55:24 -07:00
Satwik Kansal
3cdc9acbf3 Add new example
Closes https://github.com/satwikkansal/wtfPython/issues/9
2017-09-01 03:55:43 +05:30
Bengt Van De Velde
7df7637716 Fix typo. 2017-09-01 00:23:26 +02:00
Satwik Kansal
8ae68f11b6 Add new example
Closes https://github.com/satwikkansal/wtfPython/issues/9
2017-09-01 03:51:26 +05:30
Giovanni Funchal
08471cc6d5 Fix typo disperancy->discrepancy 2017-08-31 19:55:34 +01:00
Simon Charette
967d8190cb Fix the True assignment example. 2017-08-31 13:40:47 -04:00
Satwik Kansal
ddbbe69186 Fix typos
Fixes https://github.com/satwikkansal/wtfPython/issues/3
and https://github.com/satwikkansal/wtfPython/issues/2
2017-08-31 22:52:56 +05:30
Satwik Kansal
69d7d1e646 Add URL for issues, and update description. 2017-08-31 18:55:26 +05:30
Satwik Kansal
1d3cc1c8e2 Minor corrections, Update TOC, and adjust formatting. 2017-08-31 18:37:33 +05:30
Satwik Kansal
267bf1e369 Fix typos. 2017-08-31 17:01:41 +05:30
Satwik Kansal
24c3031bc1 Add CLI instructions 2017-08-31 03:32:07 +05:30
Satwik Kansal
74c91f0305 Update Header 2017-08-31 01:39:19 +05:30