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: use first_name, not first, in code samples
Type: enhancement Stage:
Components: Documentation Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: georg.brandl, georg.brandl, mwh, steveha
Priority: low Keywords:

Created on 2004-09-03 05:27 by steveha, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg22312 - (view) Author: Steve R. Hastings (steveha) * Date: 2004-09-03 05:27
Low priority documentation request.


I'm studying the documentation on how to write a C module.

http://docs.python.org/ext/node22.html

Please update the sample code in the documentation to
use "first_name" rather than "first" and "last_name"
rather than "last".

When I first studied the code and saw "first" and
"last" members in a structure, I thought those were for
a linked list of some sort.  Much later in the code I
realized that the object was supposed to have a first
name and a last name, and there was no linked list at all.

"first_name" would be much more self-documenting than
"first".  An acceptable alternative would be a comment
after the "first" declaration, saying: /* first name */

This is a small point, but I think it would be an
improvement to the documentation.
msg22313 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2004-09-03 10:59
Logged In: YES 
user_id=6656

FWIW, I agree.  I'm attempting to rewrite the extending and 
embedding manual, and yes, this is one of the things I've changed.

I've just uploaded my latest draft to

   http://starship.python.net/crew/mwh/toext/

which gets a little way into the area of defining new types.  I'd 
really appreciate your comments! (to mwh@python.net, please).
msg22314 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2005-07-17 21:20
Logged In: YES 
user_id=1188172

While mwh's new docs are in the making, I added the comments
you suggested as Doc/ext/noddy2.c r1.5.4.1, r1.6.
History
Date User Action Args
2022-04-11 14:56:06adminsetgithub: 40859
2004-09-03 05:27:30stevehacreate