Skip to content
Myr

Documentation updates for file handling

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 85e4667 · Browse files · 1 file+8 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+8 added−0 removed

  • other:+8 added−0 removed

1 file+8 added−0 removed

modified:docs/arguments.rst+8 added
112 unmodified lines
113Since files opened for writing will typically immediatley empty the file,114the lazy mode should really only be disabled if the developer is 100% sure115that this is intended behavior.116117Forcing on lazy mode is also very useful to avoid resource handling118confusion. If a file is opened in lazy mode it will get a119``close_intelligently`` method that can help you figuring out if the file120needs closing or not. This is not needed for parameters, but it is121necessary for manually prompting with the :func:`prompt` function as you122do not know if a stream like stdout was openend (which was already open123before) or a real file that needs closing.124125Environment Variables126---------------------127128Like options, arguments can also get values from an environment variable.
26 unmodified lines