diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-08-03 09:54:06 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-08-03 09:54:06 -0300 |
commit | 8cbde6daa56e9e2d9dc4894c2fa3906baa4fe6e7 (patch) | |
tree | fa8d99be6dff83ab579da0e24336876b7a683799 | |
parent | 8509a0cb95b85e83f0444febc12cdcf9c25f865c (diff) | |
download | blog-8cbde6daa56e9e2d9dc4894c2fa3906baa4fe6e7.tar.gz blog-8cbde6daa56e9e2d9dc4894c2fa3906baa4fe6e7.tar.bz2 |
Research: python
-rw-r--r-- | research/python.mdwn | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/research/python.mdwn b/research/python.mdwn new file mode 100644 index 0000000..72098c2 --- /dev/null +++ b/research/python.mdwn @@ -0,0 +1,49 @@ +[[!meta title="Python"]] + +## Learning Python + +### General + +* Everything is an object. Really? What about symbols like + - and =? +* The `dir()` and `help()` functions are really useful. +* Great idea: iteration protocol. +* There are sequences and sum operations common for all types and specific type operations. + +### Iteration and optimization + + In general, leading and trailing double underscores is the naming pattern + Python uses for implementation details. The names without the underscores in + this list are the callable methods on string objects. + +### Polymorphism + +Python encourages polymorphism: + + This is related to the idea of polymorphism mentioned earlier, and it stems + from Python’s lack of type declarations. As you’ll learn, in Python, we code to + object interfaces (operations supported), not to types. That is, we care what + an object does, not what it is. Not caring about specific types means that code + is automatically applicable to many of them—any object with a compatible + interface will work, regardless of its specific type. Although type checking is + supported—and even required in some rare cases—you’ll see that it’s not usually + the “Pythonic” way of thinking. In fact, you’ll find that polymorphism is + probably the key idea behind using Python well. + +### Numeric Display Formats + +* [14. Floating Point Arithmetic: Issues and Limitations — Python 2.7.13 documentation](https://docs.python.org/2/tutorial/floatingpoint.html) +* [What Every Computer Scientist Should Know About Floating-Point Arithmetic](https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html) +* [Floating-point arithmetic - Wikipedia](https://en.wikipedia.org/wiki/Floating-point_arithmetic). + + This floating-point limitation is especially apparent for values that cannot be + represented accurately given their limited number of bits in memory. + + [...] + + fractions and decimals both allow more intuitive and accurate results than + floating points sometimes can, in different ways—by using rational + representation and by limiting precision + +## Libraries + +* [SciPy.org — SciPy.org](https://www.scipy.org/) ([package](https://packages.debian.org/stable/python-scipy)). |