Sorry, forgot to include the output of doctest_driver.py --help.
Here it is:
-Edward
Usage: doctest_driver.py [options] NAME ...
Options:
--version show program's version number and exit
-h, --helpshow this help message and exit
Actions (default=check):
On Feb 15, 2007, at 2:59 PM, Raymond Hettinger wrote:
* Enhance doctest with a method that computes updated doctest
results. If the
only change I make to a matrix suite is to add commas to long
numbers in the
matrix repr(), then it would be nice to have an automated way to
update the
Gregor Lingl wrote:
Yes,, and I have some ideas in this respect, but mainly a prioncipal
question. I read about
using doctest and unittest, but how does one devise
automatic test suites for graphical output. In the end it depends on how
it looks like.
There are a few options here.. Two
draconux wrote:
Hello all ,
string.lstrip(source/old_prog,source/) return ld_prog instead of
old_prog
You are misunderstanding what the second argument to lstrip does. It is
interpreted as a list of characters; and lstrip will remove the maximal
prefix of the string that consists of
Guido van Rossum wrote:
On 5/11/06, Vladimir 'Yu' Stepanov [EMAIL PROTECTED] wrote:
If for Python-3000 similar it will be shown concerning types
str(), int(), complex() and so on, and the type of exceptions
will strongly vary, it will make problematic redefinition of
behavior of function of
Steven Bethard wrote:
On 5/7/06, Edward Loper [EMAIL PROTECTED] wrote:
Talin wrote:
Braces can be escaped using a backslash:
My name is {0} :-\{\}.format('Fred')
Which would produce:
My name is Fred :-{}
Do backslashes also need to be backslashed
Talin wrote:
Braces can be escaped using a backslash:
My name is {0} :-\{\}.format('Fred')
Which would produce:
My name is Fred :-{}
Do backslashes also need to be backslashed then? If not, then what is
the translation of this:?
r'abc\{%s\}' % 'x'
I
On May 6, 2006, at 2:40 AM, Nick Coghlan wrote:
Remember, the idea with portable path information is to *never*
store os.sep
and os.extsep anywhere in the internal data - those should only be
added when
needed to produce strings to pass to OS-specific functions or to
display to users.
Martin v. Löwis wrote:
One reason I see is to have keyword-only functions, i.e. with no
positional arguments at all:
def make_person(*, name, age, phone, location):
pass
which also works for methods:
def make_person(self, *, name, age, phone, location):
pass
In
Fred L. Drake, Jr. wrote:
On Sunday 30 April 2006 22:50, Edward Loper wrote:
I see two possible reasons:
Another use case, observed in the wild:
- An library function is written to take an arbitrary number of
positional arguments using *args syntax. The library is released
Fredrik Lundh wrote:
And again, why would you *make* me, the user-programmer, type
make_person(name=namex, age=agex, phone=phonex, location = locationx)
#instead of
make_person(namex,agex,phonex,locationx)
?
because a good API designer needs to consider more than just the current
Brett Cannon wrote:
The second question is whether it is worth providing a function that
will either figure out if a tuple and dict representing arguments
would work in calling the function. Some have even suggested a
function that returns the actual bindings if the call were to occur.
Rudy Rudolph wrote:
2) pass-by-reference:
def f(wrappedParam):
wrappedParam[0] += 5 # ugh
return this is my result
# call it
x = 2
result = f([x])
# also ugly, but x is now 7
This example is broken; here's what you get when you run it:
def
Terry Reedy wrote:
There are two subproposals: first, keyword-only args after a variable
number of positional args, which requires allowing keyword parameter
specifications after the *args parameter, and second, keyword-only args
after a fixed number number of positional args, implemented
Josiah Carlson wrote:
[...] get str.join to support objects which
implement the buffer interface as one of the items in the sequence?
Something like:
y = 'hello world'
buf1 = buffer(y, 0, 5)
buf2 = buffer(y, 6)
print ''.join([buf1, buf2])
should print helloworld
Nick Coghlan wrote:
Edward Loper wrote:
This is incompatible with the recent proposal making str.join
automatically str-ify its arguments. i.e.:
''.join(['a', 12, 'b']) - 'a12b'.
I don't feel strongly about either proposal, I just thought I'd point
out that they're mutually exclusive
Nick Coghlan wrote:
OTOH, if the two protocols are made orthogonal, then it's clear that the
manager is always the original object with the __context__ method. Then the
three cases are:
- a pure context manager (only provides __context__)
- a pure managed context (only provides
Martin v. Löwis wrote:
Edward C. Jones wrote:
The contents page for the Python Library Reference
(http://docs.python.org/dev/lib/lib.html;) has become much too long.
I disagree. It serves my purposes very well: I usually search in the
page for a keywork I think should be there. If the page
Robey Pointer wrote:
On 30 Dec 2005, at 18:29, Christopher Armstrong wrote:
[epydoc] is not really even good enough for a lot of my usage without some
seriously evil hacks. The fundamental design decision of epydoc to
import code, plus some other design decisions on the way it figures
types
19 matches
Mail list logo