| Commit message (Collapse) | Author | Age | Lines |
|
|
|
|
|
| |
* [python3/en] Add empty tuple to "False if evaluated" list
* [python3/en] Fixed "StopIterator Exception" - no such exception
|
| |
|
|
|
|
|
|
|
|
| |
The result of division is always a float.
e.g.
35/5 = 7.0
10 / 3 = 3.3333333333333335
10.0 / 3 = 3.3333333333333335
10 / 3.0 = 3.3333333333333335
|
|
|
|
|
| |
* explain that you can place the human and bat classes into seperate
files
* explain how to import specific functions from other files
|
|
|
|
|
|
|
|
|
|
| |
* updated docs on division for python3
prev. docs were confusing, did not show how to actually divide.
* modified language about python division
* fixed grammar
|
| |
|
| |
|
|
|
|
|
|
| |
* add new book
* sanitized link
|
| |
|
|
|
|
| |
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.
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
* Add set and dict comprehensions for python 2 and 3
* Clean up formatting and generator explanation
* Include documentation for generator comprehensions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
| |
Remove TODO
|
|
|
|
|
|
|
|
|
| |
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]
```
|
|
|
| |
`map` requires `list` in order to convert the mapping to its list. E.g. `<map at 0x11057ce48>` to `[11, 12, 13]`.
|
|\
| |
| | |
[python/en] Add note about Python Module Order of Import
|
| | |
|
|\ \
| | |
| | |
| | |
| | | |
ankitaggarwal011/python3-ternary-operator-documentation-add
[python3/en] Adding documentation on ternary operator
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
# Conflicts:
# python.html.markdown
|
| | | | |
|
|/ / / |
|
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | | |
range( start = lower limit, End is < Upper limit , Step)
The upper limit is never printed. Fixed the error.
|
|/ /
| |
| | |
math.sqrt(16) returns 4.0 instead of 4
|
|\ \ |
|
| | | |
|
| |\ \
| | | |
| | | | |
[python3/en] 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.
|
| | | | |
|
| |/ /
| | |
| | |
| | | |
These have been valuable resources to me, but I'm not sure
whether it fits this section or not.
|
| | |
| | |
| | |
| | | |
This adds the property decorator (getter, setter, deleter) to the class example.
Also update scopes functions to fit PEP8.
|
| | | |
|
|/ /
| |
| |
| |
| |
| | |
Lists: added `remove`, `insert` and `index`
Tuples: added extended unpacking
Dictionaries: added new unpacking from Python 3.5
Sets: added ^, <=, >= operators
|
|\ \
| | |
| | | |
Range is not a generator
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
[python3/en] Added examples of multiple parameters to higher order functions
|
| |/ / |
|
|/ / |
|
|\ \
| | |
| | | |
[python3/en] edits and additions
|
| | |
| | |
| | |
| | | |
Fixed the spacing to conform with standards.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
| |
A description of the step parameter of the range function is added. An example of its use in a for loop is also given.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|