homepage

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: IMPLEMENTATION token differently delt with in NNTP capability
Type: behavior Stage: resolved
Components: Extension Modules Versions: Python 3.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: jelie, pitrou
Priority: normal Keywords:

Created on 2010年11月01日 20:16 by jelie, last changed 2022年04月11日 14:57 by admin. This issue is now closed.

Messages (4)
msg120159 - (view) Author: Julien ÉLIE (jelie) Date: 2010年11月01日 20:16
I believe the case of "IMPLEMENTATION" should be treated differently.
It is not helpful at all to split the argument. It is meant to be a
text string and ['INN', '2.6.0', '(20101101', 'prelease)'] does not
have much meaning...
Suggestion:
 if line.startswith("IMPLEMENTATION"):
 name, *tokens = line.split(None, 1)
 else:
 name, *tokens = line.split()
or something else, though I do not believe another keyword will begin with "IMPLEMENTATION"...
Besides, shouldn't it be checked that the line is not empty, before splitting it?
msg120336 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010年11月03日 18:26
Rather than special casing the dict item, I would rather add an "nntp_implementation" attribute containing the desired value.
> Besides, shouldn't it be checked that the line is not empty, before
> splitting it?
If the line is empty, the server is non-conformant. Then it's a matter of taste whether all errors should be wrapped in higher-level exceptions; I tend to think it's useless clutter.
msg120339 - (view) Author: Julien ÉLIE (jelie) Date: 2010年11月03日 18:38
The "nntp_implementation" attribute would be great.
OK for the exception.
msg120523 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2010年11月05日 19:16
I've committed the new attribute in r86213.
History
Date User Action Args
2022年04月11日 14:57:08adminsetgithub: 54491
2010年11月05日 19:16:57pitrousetstatus: open -> closed
resolution: fixed
messages: + msg120523

stage: resolved
2010年11月03日 18:38:43jeliesetmessages: + msg120339
2010年11月03日 18:26:18pitrousetmessages: + msg120336
2010年11月02日 00:22:24r.david.murraysetnosy: + pitrou
2010年11月01日 20:16:06jeliecreate

AltStyle によって変換されたページ (->オリジナル) /