Skip to content

Commit 436fb5b

Browse files
committed
Merge branch 'master' of github.com:mattharrison/Tiny-Python-3.6-Notebook
2 parents daa15dd + e63612e commit 436fb5b

File tree

2 files changed

+27
-9
lines changed

2 files changed

+27
-9
lines changed

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,29 @@ to the Python syntax.
1414
Reviews
1515
---------
1616

17+
> This is an awesome python3 resource I share all the time. 🐍🎉 - @nnja (MS Developer Advocate)
18+
1719
> I think it's pretty awesome. It's all of the syntax boiled down to just the facts man. - Brian Okken (Host of Test & Code podcast)
1820
1921

2022
> It's the perfect follow on to a training course. - Michael Kennedy (Host of Talk Python podcast)
2123
24+
> Great Python reference book by @\_\_mharrison\_\_ "Tiny Python 3.6 Notebook" It's NOT a @ProjectJupyter notebook - @okeedoak
25+
26+
> Goodness! So thankful for @\_\_mharrison\_\_ and his Tiny Python 3.6 Notebook. Great resource! Go get it… - @\_\_jamesssio\_\_
27+
28+
> Tiny #Python notebook for looking up all the basics. I found this a very concise read if you have some prev prog exp - @andreasose
29+
30+
> Useful collection of notes on Python 3.6 - @hjelmj
31+
32+
> Cool work: a tiny and handy notebook containing notes, tables and examples for Python 3.6. Very much recommended! - @epaillas
33+
34+
> I keep a copy on my desk. Excellent resource - @HLIBIndustry
35+
36+
> Awesome community work! - @MostafaElzoghbi
37+
38+
> Интересный формат книги по #python - @ku_al
39+
2240
Bulk Purchase
2341
---------------
2442

python.rst

+9-9
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ REPL
5757

5858
* Use the ``help`` function to read the documentation for a module/class/function. As a standalone invocation,
5959
you enter the help system and can explore various topics.
60-
* Use the ``dir`` function to list contents of the namespace, or attributes of an object if you pass one in
60+
* Use the ``dir`` function to list contents of the namespace, or attributes of an object if you pass one in.
6161

6262
.. note::
6363

@@ -590,7 +590,7 @@ We can access members by position or name (name allows us to be more explicit)::
590590
591591
.. longtable: format: {>{\hangindent=1em\hangafter=1\raggedright\arraybackslash }p{.3\textwidth} l >{\hangindent=1em\hangafter=1\raggedright\arraybackslash }p{.3\textwidth}}
592592
593-
.. table:: Tuple Methods
593+
.. table:: Tuple Operations
594594

595595
================================== ========================= ============================================================
596596
Operation Provided Result
@@ -675,7 +675,7 @@ Sets are useful because they provide *set operations*, such as union
675675
676676
.. longtable: format: {>{\hangindent=1em\hangafter=1\raggedright\arraybackslash }p{.25\textwidth} l >{\hangindent=1em\hangafter=1\raggedright\arraybackslash }p{.35\textwidth}}
677677
678-
.. table:: Set Methods
678+
.. table:: Set Operations
679679

680680
======================================= ========================= ============================================================
681681
Operation Provided By Result
@@ -685,7 +685,7 @@ Sets are useful because they provide *set operations*, such as union
685685
``s == s2`` ``__eq__`` Equality. Sets are equal or not equal
686686
``"{}".format(s)`` ``__format__`` String format of set
687687
``s >= s2`` ``__ge__`` ``s`` in ``s2`` (see ``.issuperset``)
688-
``s > s2`` ``__gt__`` Greater. Always ``False```
688+
``s > s2`` ``__gt__`` Strict superset (``s >= s2`` but ``s != s2``).
689689
No hash ``__hash__`` Set to ``None`` to ensure you can't insert in dictionary
690690
``s &= s2`` ``__iand__`` Augmented (mutates ``s``) intersection (see ``.intersection_update``)
691691
``s |= s2`` ``__ior__`` Augmented (mutates ``s``) union (see ``.update``)
@@ -694,7 +694,7 @@ Sets are useful because they provide *set operations*, such as union
694694
``s ^= s2`` ``__ixor__`` Augmented (mutates ``s``) xor (see ``.symmetric_difference_update``)
695695
``s <= s2`` ``__le__`` ``s2`` in ``s`` (see ``.issubset``)
696696
``len(s)`` ``__len__`` Length
697-
``s < s2`` ``__lt__`` Less than. Always ``False``
697+
``s < s2`` ``__lt__`` Strict subset (``s <= s2`` but ``s != s2``).
698698
``s != s2`` ``__ne__`` Not equal
699699
``s | s2`` ``__or__`` Set union (see ``.union``)
700700
``foo & s`` ``__rand__`` Called if ``foo`` doesn't implement ``__and__``
@@ -732,9 +732,9 @@ Sets are useful because they provide *set operations*, such as union
732732
``s.discard(item)`` Remove ``item`` from s (mutates ``s``). No error on missing ``item``
733733
``s.intersection(s2)`` Return set with elements from both sets
734734
``s.intersection_update(s2)`` Update ``s`` with members of ``s2`` (mutates ``s``)
735-
``s.isdisjoint(s2)`` ``True`` is there is no intersection
736-
``s.issubset(s2)`` All elements of ``s`` in ``s2``
737-
``s.issuperset(s2)`` All elements of ``s2`` in ``s2``
735+
``s.isdisjoint(s2)`` ``True`` if there is no intersection of these two sets
736+
``s.issubset(s2)`` ``True`` if all elements of ``s`` are in ``s2``
737+
``s.issuperset(s2)`` ``True`` if all elements of ``s2`` are in ``s``
738738
``s.pop()`` Remove arbitrary item from s (mutates ``s``). ``KeyError`` on missing ``item``
739739
``s.remove(item)`` Remove ``item`` from s (mutates ``s``). ``KeyError`` on missing ``item``
740740
``s.symmetric_difference(s2)`` Return set with elements only in one of the sets
@@ -779,7 +779,7 @@ In the default namespace you have access to various callables:
779779
``enumerate(seq, [start])`` Return iterator of index, item tuple pairs. Index begins at ``start`` or ``0`` (default)
780780
``eval(source, globals=None, locals=None)`` Run ``source`` (expression string or result of ``compile``) with globals and locals
781781
``exec(source, globals=None, locals=None)`` Run ``source`` (statement string or result of ``compile``) with globals and locals
782-
``exit(code)`` Exit Python interpreter and return code
782+
``exit([code])`` Exit Python interpreter and return code (default 0)
783783
``filter([function], seq)`` Return iterator of items where ``function(item)`` is truthy (or ``item`` is truthy if ``function`` is missing)
784784
``float(x)`` Convert string or number to float (call ``x.__float__()``)
785785
``format(obj, fmt)`` Format protocol (call ``obj.__format__(fmt)``)

0 commit comments

Comments
 (0)