Re: How to create a docstring for a module?

2009-12-18 Thread Albert van der Horst
In article d95cc38a-70bf-44d5-b5d2-f9248c16c...@15g2000prz.googlegroups.com, alex23 wuwe...@gmail.com wrote: Phillip M. Feldman pfeld...@verizon.net wrote: It does seem as though IPython could be a bit more clever about this. =A0 I disagree. I _like_ that IPython is only reporting on the

Re: How to create a docstring for a module?

2009-12-08 Thread Gabriel Genellina
En Sun, 06 Dec 2009 23:51:30 -0300, alex23 wuwe...@gmail.com escribió: Phillip M. Feldman pfeld...@verizon.net wrote: It does seem as though IPython could be a bit more clever about this. I disagree. I _like_ that IPython is only reporting on the current state of the interpreter and not

Re: How to create a docstring for a module?

2009-12-06 Thread Andreas Waldenburger
On Sat, 5 Dec 2009 23:04:42 -0800 (PST) Dr. Phillip M. Feldman pfeld...@verizon.net wrote: If I create a module xyz.py with a docstring xyz does everything you could possibly want. at the top, the command ?xyz issued at the IPython prompt does not display this docstring. What am I doing

Re: How to create a docstring for a module?

2009-12-06 Thread Steven D'Aprano
On Sun, 06 Dec 2009 10:55:50 +0100, Andreas Waldenburger wrote: On Sat, 5 Dec 2009 23:04:42 -0800 (PST) Dr. Phillip M. Feldman pfeld...@verizon.net wrote: If I create a module xyz.py with a docstring xyz does everything you could possibly want. at the top, the command ?xyz issued at the

Re: How to create a docstring for a module?

2009-12-06 Thread Tim Chase
* He hasn't actually defined a docstring. Docstrings have to be string literals, you can't do this: %s does everything you could possibly want. % xyz I've occasionally wanted something like this, and have found that it can be done by manually assigning to __doc__ (either at the module-level

Re: How to create a docstring for a module?

2009-12-06 Thread Steven D'Aprano
On Sun, 06 Dec 2009 06:34:17 -0600, Tim Chase wrote: * He hasn't actually defined a docstring. Docstrings have to be string literals, you can't do this: %s does everything you could possibly want. % xyz I've occasionally wanted something like this, and have found that it can be done by

Re: How to create a docstring for a module?

2009-12-06 Thread Paul McGuire
On Dec 6, 7:43 am, Steven D'Aprano st...@remove-this- cybersource.com.au wrote: On Sun, 06 Dec 2009 06:34:17 -0600, Tim Chase wrote: I've occasionally wanted something like this, and have found that it can be done by manually assigning to __doc__ (either at the module-level or classes)

Re: How to create a docstring for a module?

2009-12-06 Thread Dr. Phillip M. Feldman
Steven D'Aprano-7 wrote: On Sun, 06 Dec 2009 10:55:50 +0100, Andreas Waldenburger wrote: On Sat, 5 Dec 2009 23:04:42 -0800 (PST) Dr. Phillip M. Feldman pfeld...@verizon.net wrote: If I create a module xyz.py with a docstring xyz does everything you could possibly want. at the top,

Re: How to create a docstring for a module?

2009-12-06 Thread Dr. Phillip M. Feldman
OK. I was able to reproduce the problem. My difficulty was that the command that I issued initially was from xyz import * rather than just import xyz. If I say import xyz, then the docstring is defined; if I say from xyz import *, it isn't. I'm not sure whether this is a bug or expected

Re: How to create a docstring for a module?

2009-12-06 Thread Chris Rebert
On Sun, Dec 6, 2009 at 12:34 PM, Dr. Phillip M. Feldman pfeld...@verizon.net wrote: OK.  I was able to reproduce the problem.  My difficulty was that the command that I issued initially was from xyz import * rather than just import xyz.  If I say import xyz, then the docstring is defined; if I

Re: How to create a docstring for a module?

2009-12-06 Thread Stefan Behnel
Dr. Phillip M. Feldman, 06.12.2009 21:34: OK. I was able to reproduce the problem. My difficulty was that the command that I issued initially was from xyz import * rather than just import xyz. If I say import xyz, then the docstring is defined; if I say from xyz import *, it isn't. I'm not

Re: How to create a docstring for a module?

2009-12-06 Thread Phillip M. Feldman
Chris Rebert wrote: On Sun, Dec 6, 2009 at 12:34 PM, Dr. Phillip M. Feldman pfeld...@verizon.net wrote: OK. I was able to reproduce the problem. My difficulty was that the command that I issued initially was from xyz import * rather than just import xyz. If I say import xyz, then the

Re: How to create a docstring for a module?

2009-12-06 Thread alex23
Phillip M. Feldman pfeld...@verizon.net wrote: It does seem as though IPython could be a bit more clever about this.   I disagree. I _like_ that IPython is only reporting on the current state of the interpreter and not trying to second guess what I meant. If the user asks for documentation on

How to create a docstring for a module?

2009-12-05 Thread Dr. Phillip M. Feldman
If I create a module xyz.py with a docstring xyz does everything you could possibly want. at the top, the command ?xyz issued at the IPython prompt does not display this docstring. What am I doing wrong? -- View this message in context: