On 27 May 2005 10:52:36 -0400,
Dan Sommers [EMAIL PROTECTED] wrote:
And use string.ascii_letters[ 1 : ] + string.ascii_letters[ 0 ] for the
second parameter to string.maketrans.
Oops. Thank you Duncan and Rocco for correcting my mistake.
Regards,
Dan
--
Dan Sommers
http
for
string.maketrans
And use string.ascii_letters[ 1 : ] + string.ascii_letters[ 0 ] for the
second parameter to string.maketrans.
Regards,
Dan
--
Dan Sommers
http://www.tombstonezero.net/dan/
--
http://mail.python.org/mailman/listinfo/python-list
On 25 May 2005 21:31:57 -0700,
Sriek [EMAIL PROTECTED] wrote:
Similarly, why do we have to explicitly use the 'self' keyword
everytime?
Why do they (the C++ programmers) prepend m_ to otherwise perfectly
good member names?
Regards,
Dan
--
Dan Sommers
http://www.tombstonezero.net/dan
of multiplcation over addition does not translate
to a distributive property of repetition over concatenation:
2 * ( 3 + 4 ) == 14
2 * 3 + 2 * 4 == 14
but
2 * ( ABC + DEFG ) == ABCDEFGABCDEFG
2 * ABC + 2 * DEFG == ABCABCDEFGDEFG
Regards,
Dan
--
Dan Sommers
http
, 27 )
Now if we really want some bonus points..
a=1, b=2, c=3 ... z=26 aa=27 ab=28 etc..
It's still one line, following the pattern from above, just longer.
Now why do you want to do this?
Regards,
Dan
--
Dan Sommers
http://www.tombstonezero.net/dan/
--
http://mail.python.org/mailman
know for sure.)
But a better-than-an-exhaustive-search algorithm sounds like a good
idea, too.
Regards,
Dan
--
Dan Sommers
http://www.tombstonezero.net/dan/
--
http://mail.python.org/mailman/listinfo/python-list
):
pass
a = A( )
m = a.method # optimize runtime lookups for a.method
for x in range( 10 ):
m( )
Regards,
Dan
--
Dan Sommers
http://www.tombstonezero.net/dan/
--
http://mail.python.org/mailman/listinfo/python-list
stop = start
start = 1
# rest of function goes here
HTH,
Dan
--
Dan Sommers
http://www.tombstonezero.net/dan/
--
http://mail.python.org/mailman/listinfo/python-list
the power of polymorphism to modelate the problem.
Polymorphism in Python is a solution looking for a problem.
Regards,
Dan
--
Dan Sommers
http://www.tombstonezero.net/dan/
--
http://mail.python.org/mailman/listinfo/python-list
On 10 May 2005 16:49:25 -0700,
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
But I can't find any Qt widget that enables me to browse for a
directory! ...
Try QFileDialog.getExistingDirectory.
HTH,
Dan
--
Dan Sommers
http://www.tombstonezero.net/dan/
--
http://mail.python.org/mailman/listinfo
to Python. So just use generic names:
for line in conf:
if regex.search( line )
theLine = line
theLineNum = conf.index( theLine )
etc.
HTH,
Dan
--
Dan Sommers
http://www.tombstonezero.net/dan/
c = 1
--
http://mail.python.org/mailman/listinfo/python-list
debugging your brain, but since I would like to remain married, I will
not make it. :-/
Regards,
Dan
--
Dan Sommers
http://www.tombstonezero.net/dan/
c = 1
--
http://mail.python.org/mailman/listinfo/python-list
--
Dan Sommers
http://www.tombstonezero.net/dan/
c = 1
--
http://mail.python.org/mailman/listinfo/python-list
A - or is that not possible?
Perhaps if you can post a minimal example that shows us what you're
running into, someone here will know how to help.
HTH,
Dan
--
Dan Sommers
http://www.tombstonezero.net/dan/
c = 1
--
http://mail.python.org/mailman/listinfo/python-list
version (e.g. 1.0rc4 becomes 1.0), that you may
have to know something more about where you particular version numbers
come from.
Regards,
Dan
--
Dan Sommers
http://www.tombstonezero.net/dan/
c = 1
--
http://mail.python.org/mailman/listinfo/python-list
the two cases (accumulating
scalars vs. accumulating a list), though.
Regards,
Dan
--
Dan Sommers
http://www.tombstonezero.net/dan/
c = 1
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 19 Mar 2005 15:17:59 GMT,
Raymond Hettinger [EMAIL PROTECTED] wrote:
[Dan Sommers]
Curious that in this lengthy discussion, a method name of
accumulate never came up. I'm not sure how to separate the two
cases (accumulating scalars vs. accumulating a list), though.
Separating
Thank you beliavsky, Sean, and Scott for the pointers.
Regards,
Dan
--
Dan Sommers
http://www.tombstonezero.net/dan/
c = 1
--
http://mail.python.org/mailman/listinfo/python-list
aspects of
the course.
If you know of some place I can go in order to find the right questions
to ask (and possibly the right place to ask them!), then don't be afraid
to let me know that, too.
Thanks,
Dan
--
Dan Sommers
http://www.tombstonezero.net/dan/
c = 1
--
http://mail.python.org
to the particular (ab)uses of C++ involved.
Really, of course, the only things you need to make explicit are the
ones that readers don't understand :-)
+1 QOTW
We used to have holy wars over the appropriate level of comments in
source code.
Regards,
Dan
--
Dan Sommers
http://www.tombstonezero.net/dan
interface.
I wish I'd said it that well in the first place myself. :-)
Regards,
Dan
--
Dan Sommers
http://www.tombstonezero.net/dan/
c = 1
--
http://mail.python.org/mailman/listinfo/python-list
--
Dan Sommers
http://www.tombstonezero.net/dan/
c = 1
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 01 Mar 2005 01:39:13 +0100,
Thomas Lotze [EMAIL PROTECTED] wrote:
Dan Sommers wrote:
I think I'd add a change_temperature_to method that accepts the
target temperature and some sort of timing information, depending on
how the rest of the program and/or thread is structured
On Tue, 01 Mar 2005 02:27:03 GMT,
Andrew Dalke [EMAIL PROTECTED] wrote:
Me:
What's wrong with the use of attributes in this case and how
would you write your interface?
Dan Sommers:
I think I'd add a change_temperature_to method that accepts the target
temperature and some sort of timing
,
Dan
--
Dan Sommers
http://www.tombstonezero.net/dan/
c = 1
--
http://mail.python.org/mailman/listinfo/python-list
glance (and
even second and third glance), but nearly idiomatic to those of us who
spent lots of time writing embedded assembly code.
If you have the space to spare, a lookup table (pre-calculated or
created during your program's initialization) is probably the best way
to go.
Regards,
Dan
--
Dan
On 18 Feb 2005 01:25:06 -0800,
Serge Orlov [EMAIL PROTECTED] wrote:
Dan Sommers wrote:
So my question is: Is there a way to pass options through a format
string to the __str__ and __repr__ functions? For example, can I
define my own alternate form for use with the '#' formatting
character
, but
that solution makes me cringe.
Thank you,
Dan
--
Dan Sommers
http://www.tombstonezero.net/dan/
Never play leapfrog with a unicorn.
--
http://mail.python.org/mailman/listinfo/python-list
--
Dan Sommers
http://www.tombstonezero.net/dan/
Never play leapfrog with a unicorn.
--
http://mail.python.org/mailman/listinfo/python-list
] well-known
Adobe SNAFU. (A quick google search or two failed to find an
authoritative reference, but I know that such references are out there
somewhere.)
Regards,
Dan
--
Dan Sommers
http://www.tombstonezero.net/dan/
Never play leapfrog with a unicorn.
--
http://mail.python.org/mailman
be separate from what have fallen by the wayside.
So ... anybody for a DB-API 2.1 with mandatory pyformat support and a
tuple dbmodule.paramstyles for supported styles?
I'd be all for that, but I'm not holding my breath. ;-)
Regards,
Dan
--
Dan Sommers
http://www.tombstonezero.net/dan/
Never play
401 - 431 of 431 matches
Mail list logo