What's now & The Rest of The Tutorial

13. What Now?

Where should you go to learn more?

14. Interactive Input Editing and History Substitution

Python’s line editing feature is implemented by the GNU Readline library

14.1. Tab Completion and History Editing

The default configuration also saves your history into a file named .python_history in your user directory. The history will be available again during the next interactive interpreter session.

14.2. Alternatives to the Interactive Interpreter

15. Floating Point Arithmetic: Issues and Limitations

binary can never precisely represent some float number, so do Python

1
2
>>> 0.10000000000000001 == 0.1
True

this is not a bug in Python, and it is not a bug in your code either. You’ll see the same kind of thing in all languages that support your hardware’s floating-point arithmetic

1
2
3
4
>>> round(.1, 1) + round(.1, 1) + round(.1, 1) == round(.3, 1)
False
>>> round(.1 + .1 + .1, 10) == round(.3, 10)
True

15.1. Representation Error

This section explains the “0.1” example in detail, and shows how you can perform an exact analysis of cases like this yourself.

Detail

16. Appendix

16.1.3. The Interactive Startup File

  • you can set an environment variable named PYTHONSTARTUP to the name of a file containing your start-up commands.(Interactive mode only)

  • If you want to use the startup file in a script, you must do this explicitly in the script:

    1
    2
    3
    4
    5
    6
    import os
    filename = os.environ.get('PYTHONSTARTUP')
    if filename and os.path.isfile(filename):
    with open(filename) as fobj:
    startup_file = fobj.read()
    exec(startup_file)
  • *Maybe Back door can be created here!!!**

16.1.4. The Customization Modules

See the documentation of the site module for more details.

Maybe Back door can be created here!!!