[issue4746] Misguiding wording 3.0 c-api reference

2008-12-29 Thread Georg Brandl
Georg Brandl added the comment: I don't see a reason to keep this open any longer. -- resolution: -> works for me status: open -> closed ___ Python tracker ___ _

[issue4746] Misguiding wording 3.0 c-api reference

2008-12-29 Thread Martin v. Löwis
Martin v. Löwis added the comment: > Whenever the documentation says "you must not" it really says "don't do > that or your application *will* crash, burn and die"... Of course I can > allocate storage for the string, copy it's content and then free or - > nothing will happen. How would it cause

[issue4746] Misguiding wording 3.0 c-api reference

2008-12-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: For me, when I read "You must not provide storage for the string itself", it obviously means I mustn't do so *before calling the PyArg_ParseTuple function*. It is also obvious that I am allowed to copy the returned contents wherever I want, and it should be obvi

[issue4746] Misguiding wording 3.0 c-api reference

2008-12-29 Thread ebfe
ebfe added the comment: Whenever the documentation says "you must not" it really says "don't do that or your application *will* crash, burn and die"... Of course I can allocate storage for the string, copy it's content and then free or - nothing will happen. How would it cause a crash - it's my

[issue4746] Misguiding wording 3.0 c-api reference

2008-12-27 Thread Martin v. Löwis
Martin v. Löwis added the comment: > I guess the phrase "you must not provide storage" is a failed > translation and not meant like that. It should say "you are not required > to provide storage". It's confusing to have such strong wording without > reason. It's stronger than "you are not requi

[issue4746] Misguiding wording 3.0 c-api reference

2008-12-25 Thread Gabriel Genellina
Gabriel Genellina added the comment: Also, it isn't clear that the returned string must not be modified, and that the pointer lifetime is of the original string object itself. (This applies to all string and unicode formats). -- nosy: +gagenellina _

[issue4746] Misguiding wording 3.0 c-api reference

2008-12-25 Thread ebfe
New submission from ebfe : Quote from http://docs.python.org/3.0/c-api/arg.html, regarding the "s" argument: """ s (string or Unicode object) [const char *] Convert a Python string or Unicode object to a C pointer to a character string. You must not provide storage for the string itself; a