diff options
Diffstat (limited to 'research/python.mdwn')
-rw-r--r-- | research/python.mdwn | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/research/python.mdwn b/research/python.mdwn index 72098c2..3a62cad 100644 --- a/research/python.mdwn +++ b/research/python.mdwn @@ -44,6 +44,36 @@ Python encourages polymorphism: floating points sometimes can, in different ways—by using rational representation and by limiting precision +### Types + + More formally, there are three major type (and operation) categories in Python + that have this generic nature: + + Numbers (integer, floating-point, decimal, fraction, others) + Support addition, multiplication, etc. + Sequences (strings, lists, tuples) + Support indexing, slicing, concatenation, etc. + Mappings (dictionaries) + Support indexing by key, etc. + + [...] + + The major core types in Python break down as follows: + + Immutables (numbers, strings, tuples, frozensets) + None of the object types in the immutable category support in-place changes, + though we can always run expressions to make new objects and assign their + results to variables as needed. + + Mutables (lists, dictionaries, sets, bytearray) + Conversely, the mutable types can always be changed in place with operations + that do not create new objects. Although such objects can be copied, in-place + changes support direct modification. + ## Libraries * [SciPy.org — SciPy.org](https://www.scipy.org/) ([package](https://packages.debian.org/stable/python-scipy)). + +## Test projects + +* [Arduino Blog » How close are we to doomsday? A clock is calculating it in real time](https://blog.arduino.cc/2013/03/27/how-close-are-we-to-doomsday-clock/) ([python code](https://github.com/tomschofield/Neurotic-Armageddon-Indicator/blob/master/NAI_SERVER/nai_scraper.py) to parse [Timeline from the Bulletin of the Atomic Scientists](http://thebulletin.org/timeline)). |