Commit Graph

75 Commits

Author SHA1 Message Date
Patrick Callahan
2067ad6a52 [Eng/Python3] add new book: "Learn Python 3.0 VISUALLY" (#2360)
* add new book

* sanitized link
2016-09-06 18:57:47 +02:00
PhoenixYip
48ca03c3f9 correction for the set comprehension in py3 (#2358) 2016-09-06 10:38:47 +02:00
Patrick Callahan
7beaa529b9 [python3/en] Adding "Dive Into Python 3" (#2353)
The previous version of this file had the original Dive Into Python, which was written with Python 2 in mind.
It has come to my attention that the author of the original has published an updated version designed for Python 3, so I added this version back in.
2016-09-01 23:27:33 +02:00
Patrick Callahan
678fa3b974 Remove Python 2 resources from Python 3 page (#2350)
There were several resources here that teach Python 2, but not Python 3. I removed them so that a reader will only see resources that apply to Python 3.
2016-09-01 08:28:23 +02:00
J. Ryan Rembert
e053806775 [python/en] Set, dict, and generator comprehensions (#2298)
* Add set and dict comprehensions for python 2 and 3

* Clean up formatting and generator explanation

* Include documentation for generator comprehensions
2016-07-03 10:47:57 +02:00
Alexandre Constantino
e72c849556 Python3/en: multiple inheritance (#2217)
* Add __name__ check to make testing easier

* Update say to call print. Add more usage examples

* Move Modules section before Classes

Makes more sense for when explaining inheritance

* Add multiple inheritance example

* Add examples for multiple inheritance

* Add instance check examples

* Fix multiple inheritance example

* Add note on the __name__ variable
2016-06-26 15:22:47 +02:00
ven
5affe64801 String length by #1742 2016-06-16 15:19:43 +02:00
Adam Bard
f75cb997b0 Update python3.html.markdown
Remove TODO
2016-03-30 13:04:32 -07:00
Alfredo Canziani
6248cd1f84 Update python3.html.markdown
The same happens for `filter`.
```pythob
filter(lambda x: x > 5, [3, 4, 5, 6, 7])
<filter at 0x110567320>
list(filter(lambda x: x > 5, [3, 4, 5, 6, 7]))
[6, 7]
```
2016-03-30 11:24:05 -04:00
Alfredo Canziani
9dca295c05 Update python3.html.markdown
`map` requires `list` in order to convert the mapping to its list. E.g. `<map at 0x11057ce48>` to `[11, 12, 13]`.
2016-03-30 11:17:12 -04:00
ven
2c94436824 Merge pull request #1288 from DaKnOb/fixpymod
[python/en] Add note about Python Module Order of Import
2016-03-10 23:00:50 +01:00
Adam Bard
582a205219 Merge pull request #1643 from ankitaggarwal011/python3-ternary-operator-documentation-add
[python3/en] Adding documentation on ternary operator
2016-02-14 22:53:51 -08:00
sarthfrey
279c28ce7d Merge remote-tracking branch 'adambard/master'
# Conflicts:
#	python.html.markdown
2016-01-25 18:26:23 -05:00
SWalls
15a7e7ace2 Changed a to b in comment about list assignment, and pluralized 'variable'. 2016-01-10 17:22:32 -07:00
sarthfrey
299d064ecf Added Python Resources 2015-12-16 16:41:07 -05:00
Louis Christopher
3c4a2ff91c Fixed erroneous output and added a little clarity on the matter
list.index(argument) would return the index of the item in the list that first matched the argument 
It will not return the value stored at the index of the argument as it was prior.
Added some more clarity to the subject as well.
2015-11-21 19:44:23 +05:30
Louis Christopher
30e364f410 Fixed erroneous output stated in a comment
range( start = lower limit, End is < Upper limit , Step)
The upper limit is never printed. Fixed the error.
2015-11-21 19:28:59 +05:30
Leslie Zhang
646eb2a2a1 Correct math.sqrt(16)
math.sqrt(16) returns 4.0 instead of 4
2015-11-07 16:57:44 +08:00
Ankit Aggarwal
d2d89cfa97 Adding documentation on ternary operator 2015-10-19 11:47:24 +05:30
evuez
85adff2c39 Merge 'master' of github.com:adambard/learnxinyminutes-docs 2015-10-16 10:42:41 +02:00
Ankit Aggarwal
a8b32c362b Added instructions for input operations in Python3 2015-10-14 21:16:18 +05:30
Levi Bostian
ae4e4e81f4 Merge pull request #1504 from dillonjbyrne/patch-1
[python3/en] Cleaned up formatting and clarified output
2015-10-14 09:42:55 -05:00
Dillon J Byrne
518a383de1 Cleaned up formatting and clarified output
Unified the formatting throughout the document, clarified the output of a few lines, and tried to make it easier to visually separate comments from code when reading.
2015-10-13 20:03:46 -05:00
evuez
8166438016 Add PEP8 to "Free Online" 2015-10-13 17:11:40 +02:00
evuez
46ef132ce6 Add resources to the "Free Online" section
These have been valuable resources to me, but I'm not sure
whether it fits this section or not.
2015-10-13 17:05:18 +02:00
evuez
ed4fbb6aa4 Add property to Classes
This adds the property decorator (getter, setter, deleter) to the class example.
Also update scopes functions to fit PEP8.
2015-10-13 16:53:48 +02:00
evuez
df5d2adbfe Update contributors 2015-10-13 16:04:02 +02:00
evuez
f77199b780 Add some stuff to lists, tuples, dicts and sets
Lists: added `remove`, `insert` and `index`
Tuples: added extended unpacking
Dictionaries: added new unpacking from Python 3.5
Sets: added ^, <=, >= operators
2015-10-13 15:09:38 +02:00
Levi Bostian
133baf5565 Merge pull request #1478 from aayushranaut/master
Range is not a generator
2015-10-12 23:27:30 -05:00
Gnomino
097c839b7b Changed way of creating classes 2015-10-11 13:47:44 +02:00
Aayush Ranaut
7d8bab656f Range is not a generator 2015-10-09 18:48:40 -04:00
Levi Bostian
b5ffe569ef Merge pull request #1305 from kdelwat/master
[python3/en] Added examples of multiple parameters to higher order functions
2015-10-09 10:04:51 -05:00
DaKnOb
879337f9be Add Python Order Of Module Import for Python 3 2015-10-09 13:43:57 +03:00
Gabriel Halley
960ee4a185 removing whitespace all over 2015-10-07 23:11:24 -04:00
Cadel Watson
777423dcc5 Add examples of higher-order functions taking multiple arguments 2015-10-07 17:01:28 +11:00
Levi Bostian
bb02567725 Merge pull request #1306 from zfergus2/master
[python3/en] edits and additions
2015-10-05 13:14:09 -05:00
Zachary Ferguson
5225372045 Fixed whitespaces
Fixed the spacing to conform with standards.
2015-10-04 19:58:14 -04:00
VeerpalB
82bdd1b1c8 Add step parameter to range function
A description of the step parameter of the range function is added. An example of its use in a for loop is also given.
2015-10-04 19:41:13 -04:00
Zachary Ferguson
7184d7b61d Changed [python3/en]
Compared is and ==.
Noted that tuples of length 1 require an ending
comma.
Discussed that keys of dictionaries have to be immutable.
Added
that elements of a set have to be immutable.
Included an explanation of
returning multiple values with tuple assignments.
Added some clarifying
remarks to comments.
2015-10-02 17:24:36 -04:00
Foo Chuan Wei
1ccebdf972 Update python3.html.markdown 2015-09-05 21:26:22 +08:00
Foo Chuan Wei
11749e1ba0 Corrected Python3 print() function 2015-09-05 11:10:18 +08:00
Denis Gladkikh
1b767166e1 Python3: add finally and with statements 2015-09-01 10:25:04 -07:00
Genki Marshall
ac2dfe7dc7 [python3/en] Use next() instead of __next__()
Fixes issue #1148.
The reasoning is well explained by the issue. One can also refer to the
docs [0], showing it is more idiomatic to use `next()`.

[0]: https://www.python.org/dev/peps/pep-3114/
     #double-underscore-methods-and-built-in-functions
2015-07-24 13:21:01 -07:00
Al Sweigart
8a968db2bc Added links to the free book "Automate the Boring Stuff with Python" to the "Free Online" section. 2015-07-23 11:24:40 -07:00
Michael Herman
5b66758d76 Update python3.html.markdown 2015-07-05 21:12:58 -06:00
Michael Herman
55f9ff0654 python/en - added two resources 2015-07-05 08:36:51 -06:00
Geoff Liu
ffc5ac247c Python3 doc cleanup 2015-04-30 23:44:09 -06:00
Sriram Sundarraj
8cfb7ba02f [python/en] Range function arguments.
Range function with start and stop.
2015-04-23 02:06:43 +05:30
Sriram Sundarraj
d20eb1fb94 Adding strings without + added. 2015-04-23 01:48:18 +05:30
Cornel Punga
44c37d5531 [python3.html.mardown] Added a short statement about magic methods
Terminology related to Python special functions
2015-03-24 19:26:19 +02:00