Coder Social home page Coder Social logo

tiny-python-3.6-notebook's Issues

Tiny Notebook is too Tiny

The Tiny Notebook would be easier to read and handle if it were a smidge larger, including the font size.

Current physical size is 6 inches by 4.

Would be nice if it were an inch taller to fit more content vertically (feels too short to me as it is). A half inch wider to have more inner margin space, and to possibly reduce the number of line breaks in tables (though an increase in font size might negate this).

Also, the font is rather small, and the code font particularly so. I find it a bit difficult to read, but I understand it's difficult to fit monospace code examples if the font were made larger. Is there a narrower monospace font available?

A possible drawback to increasing the book's dimensions: it would probably no longer easily fit into a pocket. I don't know if that's something readers want. I personally have no reason to have it in my pocket.

correct an error

In set methods, the result of "s.issuperset(s2)" should be "All elements of s2 in s". Anyway, this is a great book!

File Modes table seems incomplete

Hi, I found this tiny python summary very helpful for catching up with the language.

During an online course I stumbled upon the file modes of the 'open()' method. The "r+" and "w+" file modes seem to be missing in this book. The only "+" mode which is mentioned is "w+b".

I think adding the "r+", "w+", "rb+", "a+" and "ab+" modes would be helpful. (Especially the difference between "r+" and "w+" is not obvious.)

From python help:

`
========= ====
Character Meaning


'r' open for reading (default)
'w' open for writing, truncating the file first
'x' create a new file and open it for writing
'a' open for writing, appending to the end of the file if it exists
'b' binary mode
't' text mode (default)
'+' open a disk file for updating (reading and writing)
'U' universal newline mode (deprecated)
========= ====`

From: https://stackoverflow.com/a/23566951
`

r          Opens a file for reading only. The file pointer is placed at the beginning of the file. This is the default mode.
rb        Opens a file for reading only in binary format. The file pointer is placed at the beginning of the file. This is the default mode.
r+        Opens a file for both reading and writing. The file pointer will be at the beginning of the file.
rb+        Opens a file for both reading and writing in binary format. The file pointer will be at the beginning of the file.
w        Opens a file for writing only. Overwrites the file if the file exists. If the file does not exist, creates a new file for writing.
wb        Opens a file for writing only in binary format. Overwrites the file if the file exists. If the file does not exist, creates a new file for writing.
w+        Opens a file for both writing and reading. Overwrites the existing file if the file exists. If the file does not exist, creates a new file for reading and writing.
wb+        Opens a file for both writing and reading in binary format. Overwrites the existing file if the file exists. If the file does not exist, creates a new file for reading and writing.
a        Opens a file for appending. The file pointer is at the end of the file if the file exists. That is, the file is in the append mode. If the file does not exist, it creates a new file for writing.
ab        Opens a file for appending in binary format. The file pointer is at the end of the file if the file exists. That is, the file is in the append mode. If the file does not exist, it creates a new file for writing.
a+        Opens a file for both appending and reading. The file pointer is at the end of the file if the file exists. The file opens in the append mode. If the file does not exist, it creates a new file for reading and writing.
ab+        Opens a file for both appending and reading in binary format. The file pointer is at the end of the file if the file exists. The file opens in the append mode. If the file does not exist, it creates a new file for reading and writing.

`

Permission to make Anki Cards

Great book - after reading the CC license I'm pretty sure creating Anki Cards wouldn't be allowed, but if it's possible I'd like to.

Thoughts / comments / feelings on this?

Context Managers example will not return expected text

>>> def start(env):
...     return '\begin{}'.format(env)

will cause start('center') to return egincenter. You need to escape the backslash and the curly braces like so:

>>> def start(env):
...     return '\\begin{{{}}}'.format(env)

same for end(env):

>>> def end(env):
...      return '\\end{{{}}}'.format(env)

edit:

the same applies for Function Based Context Managers and Class Based Context Managers

Great Book !

Thank you for the book ! Very good book !

I do have only one question for you. How you create a pdf file or hard book for amazon from rst files ?

And last but not least congratulations for good book !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.