This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Tutorial changes
Type: Stage:
Components: Documentation Versions: Python 3.2, Python 2.7
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: michael.foord Nosy List: georg.brandl, michael.foord
Priority: normal Keywords: easy

Created on 2009-09-06 17:21 by michael.foord, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg92324 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2009-09-06 17:21
There are a couple of minor changes I'd like to make to the tutorial. 

Section 6.1 introduces the import * syntax without noting that it is bad
practise. I'd like to add the following text:

The import * form is generally considered to be bad practise as it makes
it hard to tell where the names you use in your code come from, *and*
you can accidentally overwrite names if you import something that is
already defined elsewhere. It can still be useful when working in the
console.


Section 6.4.1 uses Windows 95 and DOS 8+3 as the reason that importing
from packages doesn't automatically import all sub-packages. This is out
of date and not the most compelling reasoning anyway. I'd like to
replace that text with:


Perhaps this should go out to the filesystem, find which submodules are
present in the package, and import them all. This could take a long time
and importing sub-modules might have unwanted side-effects that should
only happen when the sub-module is explicitly imported.
msg92338 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2009-09-06 21:54
In addition section 8.3 of the tutorial references the .message
attribute which is now deprecated.

But use of .args is discouraged. Instead, the preferred use is to pass a
single argument to an exception (which can be a tuple if multiple
arguments are needed) and have it bound to the message attribute. One
may also instantiate an exception first before raising it and add any
attributes to it as desired.
msg92339 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2009-09-06 22:00
The TransitionError defined in section 8.5 of the tutorial has a
'message' argument / attribute that will raise a DeprecationWarning in
Python 2.6.
msg92391 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-09-07 20:35
I've already renamed the message attribute in the 2.x tutorial in trunk.
msg92574 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2009-09-13 17:08
Committed revision 74782.
History
Date User Action Args
2022-04-11 14:56:52adminsetgithub: 51098
2009-09-13 17:08:00michael.foordsetstatus: open -> closed
resolution: accepted
messages: + msg92574
2009-09-07 20:35:13georg.brandlsetnosy: + georg.brandl
messages: + msg92391
2009-09-06 22:00:15michael.foordsetmessages: + msg92339
2009-09-06 21:54:37michael.foordsetmessages: + msg92338
2009-09-06 17:21:46michael.foordcreate