for j in range(n):
> rv[i][j] = lst[i * n + j]
> return rv
>
> Thanks!
Here's a terrible way to do it:
def divide_list(lst, n):
return zip(*[lst[i::n] for i in range(n)])
[It produces a list of tuples rather than a list of lists, but it
usually won't matter].
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
ug).
Perhaps you meant this?
regex = re.compile(r'(.*\\).*')
This matches any number of characters followed by a backslash (group
1), and then any number of characters. If you're using this for path
splitting filenames under Windows, you should look at os.path.split
instead of writing your own.
HTH
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
worked. Can anybody give any tips to help?
Is your file utf-16 (that would explain why your file has \x00 in
between every character)? If so, use codecs.open to read it, and you
won't get the \x00's (you'll get a unicode string).
Or you can remove them using replace:
a = a.replace('\x00', '')
HTH
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
On Dec 26, 1:09 am, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Mon, 24 Dec 2007 17:14:58 +0100, Martin P. Hellwig wrote:
> > As Dennis already pointed out I like to use dictionaries in these cases,
> > so I would use sand = dict() instead of sands = list() and would do
> > s
tchall():
> csvFile.write(','.join(row) + "\n")
> csvFile.close
As usual, the python standard library has functions that do what you
want! Using the csv module will help you avoid trouble when your data
contains commas or control characters such as newlines.
import csv
help(csv)
Suggests this code:
import csv
csv_file = open('output.csv', 'w')
csv_writer = csv.writer(csvFile)
csv_writer.writerows(cursor.fetchall())
csv_file.close()
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
ator rather than building a list
which is probably only going to be iterated over. But if you prefer
the list version, replace 'itertools.imap' with 'map'.
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
r-word.
def cube(x):
return x * x * x
def taxicab(n):
return [(cube(a) + cube(b), (a, b), (c, d))
for a in range(1, n + 1)
for b in range(a + 1, n + 1)
for c in range(a + 1, n + 1)
for d in range(c + 1, n + 1)
if cube(a) + cube(b) == cube(c) + cube(d)]
for n in (10, 12, 20):
print list(taxicab(n))
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
ay it was quite readable
if you're familiar with groupby.
And back on topic... I use itertools regularly (and have a functional
background), but have never needed takewhile or dropwhile. I'd be
happy to see them deprecated.
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 3, 1:31 pm, Simon Willison <[EMAIL PROTECTED]> wrote:
> How can I tell Python "I know this says it's a unicode string, but I
> need you to treat it like a bytestring"?
u'Bob\x92s Breakfast'.encode('latin-1')
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
t
self.stopLoc = stop
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
n = random.randint(0, len(r) - 1)
r[0], r[n] = r[n], r[0]
return x
# Nothing in the list passes the 'prop' test.
return None
# Example: pick 100 odd integers from 0 to 1000.
a = RandomPicker(xrange(1000), lambda x: x % 2 == 1)
print [a
xrange(n):
r = random.randrange(n - i)
yield x[r]
x[r] = x[n - i - 1]
def shuffled(seq):
"Generate the elements of seq in a random order"
return (seq[i] for i in randxrange(len(seq)))
def pick_random(seq, prop):
return itertools.ifilter(prop, shuffled
perty.
print [random_pick(range(100), lambda x:x > 90)
for i in range(999)].count(91)
929
If it were uniform, it should be around 111.
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
stabs):
r = random.randrange(L)
if prop(seq[r]): return seq[r]
random.shuffle(seq)
return itertools.ifilter(prop, seq).next()
I've used 5 'stabs' here. Perhaps it should be a function of L, but I
suppose you can tune it for your data.
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 5, 5:12 pm, Paul Hankin <[EMAIL PROTECTED]> wrote:
> On Jan 5, 4:14 pm, [EMAIL PROTECTED] wrote:
>
> > On Jan 5, 5:07 pm, [EMAIL PROTECTED] wrote:
>
> > > Hello, Paul and Arnaud.
> > > While I think about your answers: do you think there is any way to
ere things are used (eg.
seeing where "all validation OK" is used requires you to read every
line of your method).
def mymethod(self):
if not validateSthing():
return (False, "sthing failed")
dosomeprocessing()
if not validateSthingelse():
return (False, "sthingelse failed")
domoreprocessing()
...
return (True, "all validation OK")
Isn't that a lot more readable?
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
s.path.join(host_path, '%s.txt' % fn), 'wb')
> for fn in filenames
> ]
>
> It becomes even more clear if you make an intermediate "opener"
> function such as
>
> binwriter = lambda fname: open(
> os.path.join(host_path, '%s.txt' % fname), 'wb')
>
> (messages, deliveries, actions, parts,
> recipients, viruses, esp_scores) = [
> binwriter(fn) for fn in filenames]
This can be more cleanly written using locals()
for fn in filenames:
locals()[fn] = open(os.path.join(host_path, fname + '.txt', 'wb')
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 9, 10:02 am, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Paul Hankin wrote:
> > This can be more cleanly written using locals()
>
> > for fn in filenames:
> > locals()[fn] = open(os.path.join(host_path, fname + '.txt', 'wb
a list of the the 3 element tuples using
> itertools (just for a bit of fun). I'm trying this:
>
> list(itertools.chain(testDict.itervalues())
Close! Try:
list(itertools.chain(*testDict.itervalues())
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
in deco:
...
or
for v, k in sorted(deco, reverse=True):
...
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 14, 12:56 pm, Neal Becker <[EMAIL PROTECTED]> wrote:
> How do I tell if my python-2.5 is build with ucs2 or ucs4?
See if unichr(0x1) raises ValueError: if it does, you're ucs2.
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
t; b = '%d\t%s-%s.%f'
> >>> c = mysticalfunction(a,b)
> >>> print c
>
> [3456,'blub','blib',0.9]
Use regular expressions: see http://docs.python.org/lib/node49.html
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
, **kw):
pad = kw.get('padding', None)
maxlen = max(len(x) for x in xs)
return islice(izip(*[chain(x, repeat(pad)) for x in xs]), maxlen)
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 17, 7:02 pm, George Sakkis <[EMAIL PROTECTED]> wrote:
> On Jan 17, 12:25 pm, Paul Hankin <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Jan 17, 4:38 pm, Bruno Desthuilliers
> > [EMAIL PROTECTED]> wrote:
> > > Now there are very certainly smart solut
nge.
> any ideas please?
Have a look at difflib in the standard library.
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
> Do you want to do this?:
> locals()['var'+str(1)] = "spam"
As I recently learnt in this newsgroup, that's not guaranteed to work.
>From http://docs.python.org/lib/built-in-funcs.html
Warning: The contents of this dictionary should not be modified;
changes
al
post, and it's also a much cleaner approach.
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
] = getattr(app, 'TITLE', name.title())
except ImportError:
pass
# Remove apps with no title, ie those that didn't import.
apps = [name for name in apps if apptitles.get(name)]
Alternatives for the last line would be 'apps = filter(apptitles.get,
apps)'
or 'apps = apptitles.keys()'.
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
.. but how often do you really
need to do that?
If I really had to modify it in place (and the condition wasn't really
x == 99), how about:
bad_indices = [i for i, x in enumerate(a) if x == 99]
for bad_index in reversed(bad_indices):
del a[bad_index]
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
ime will do this!
You can find the documentation at http://docs.python.org/lib/module-time.html
Untested:
time.strptime(my_date, '%d %b %y %H:%M:%S %Z')
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
that
business logic EVER changes ;). I'd be tempted to include the business
rule table as a text file or string, and parse it at program startup
to build the hashtable. That way anyone can look at or modify the
table, even if they know nothing about python or coding.
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> I need to search list a for the sequence of list b
def list_contains(a, b):
return any(a[i:i+len(b)] == b for i in range(len(a) - len(b) + 1))
list_contains(range(1, 7), [2, 3, 4])
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 12, 10:17 pm, Ben C <[EMAIL PROTECTED]> wrote:
> On 2008-02-12, Paul Rubin <> wrote:
>
> > Paul Hankin <[EMAIL PROTECTED]> writes:
> >> def genDescendants(self):
> >> return chain([self], *[child.genDescendants()
> >>
def genDescendants(self):
return chain([self], *[child.genDescendants()
for child in self.children])
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
sian_product(*args):
"Generate the cartesian product of the sequences passed in."
for x in cart_lists(map(list, args), len(args), [None] *
len(args)):
yield tuple(x)
print list(cartesian_product('ab', 'cd', xrange(3)))
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
ing containment in a generator is better
(more readable).
if element[0] not in (x[0] for x in a):
a.append(element)
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
and y' first evaluates x; if x is false, its value
is returned; otherwise, y is evaluated and the resulting value is
returned.
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
fashion shown below
>
> y = []
> for i in range(0, width*height, width*2):
> for j in range(0,width):
> y.append(Y[i+j])
There's nothing really wrong with your code. Maybe it's a little nicer
written like this:
y = []
for i in range(0, height, 2):
y.extend(Y[i
for y in process(x):
> q.append(y)
Or (almost) equivalently...
while q:
x = q.pop(0)
q.extend(process(x))
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
ds:
> for nn in n.__iter__():
> yield nn #2
Only one yield and shorter (but not really any simpler):
from itertools import chain
class Node:
...
def __iter__(self):
for x in chain([self], *self.childs):
yield x
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 10, 3:12 am, George Sakkis <[EMAIL PROTECTED]> wrote:
> On Mar 9, 7:37 pm, Paul Hankin <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Mar 9, 8:58 pm, duccio <[EMAIL PROTECTED]> wrote:
>
> > > Someone knows if it's possible to make this __iter
On Mar 11, 10:35 am, royG <[EMAIL PROTECTED]> wrote:
> i am checking if a directory exists and if it does i want to delete it
> and its contents.then i want to create the directory before creating
> files in it.
Have a look at shutil.rmtree
--
Paul Hankin
--
http://mail.pyt
gt; bit already from reading numpy module. What I want to know is how to
> get the number of occurences of numeric element in an array. Say,
Something like this should do the job:
histogram = [0] * 256
for x in my_array:
histogram[x] += 1
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
; and set _KeepGoing. receive_message can extract the
interesting bit from the socket read. Hope you get the idea.
This way, you don't use the inner workings of client in the Listener
and Speaker classes, and don't violate the 'law of demeter'. If
nothing else, it makes the speaker and listener much easier to read.
If you later want to test these classes, you'll find it a ton easier,
since you can mock the client class.. but perhaps that's a little too
advanced.
HTH
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
On Apr 19, 7:37 pm, "Gabriel Genellina"
wrote:
> The threading module has such aliases, but there are no plans for mass
> renaming all the stdlib that I know of. You'll have to live with this
> inconsistency.
It's been fixed in Python 3.0!
--
Paul Hankin
--
h
es to download the file? Now let's
> say during those 15 minutes, the program needs to parse the data in
> the existing file.
If your modem is going at full speed for those 15 minutes, you'll have
around 6.3Mb of data. Even after decompressing, and unless the data is
in some quite difficult to parse format, it'll take seconds to
process.
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
27;) or i
> > (or perhaps
> > print (('' if i%3 else 'Fizz') + ('' if i%5 else 'Buzz')) or i
> > to save looking up the precedence rules) ?
>
> Stuff clarity! How about
>
> for i in xrange(1, 101):
> print 'FizzBuzz'[4*(i%3>0):4+4*(i%5<1)] or i
for i in xrange(1, 101):
print 'Fizz'*(i%3<1)+'Buzz'*(i%5<1) or i
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
def test(iterable, value, op=operator.ne):
for x in iterable:
if not op(x, value):
return
yield x
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
n = set()
return ''.join(seen.add(c) or c for c in s if c not in seen)
I wouldn't write it this way though :)
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
On May 20, 7:34 pm, [EMAIL PROTECTED] wrote:
> i have a big file with sentences, the first file of each sentence
> contains a colon(:) somewher eon that line
> i want to jump past that sentence.
>
> if all(x != ':' for x in line):
>
> this way i can check but i dont want to check for every line in
x27;858215558'
>
> I want to remove any spaces between string and any dashes between
> strings. I could do it in access manually but want to do from python
> script
'filter' returns a string if it's argument is a string, so works
nicely here.
def cleanup(s):
retur
* i for x in xrange(4) for i in xrange(1, 3)]
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
line 7, in __init__
> self.args = args
> TypeError: 'NoneType' object is not iterable
>
> Ummm... why should 'args' have to be iterable anyway? I don't understand
> what's going on here? Could someone help me with this?
Did you actually write self,args = args?
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
On May 28, 11:25 am, "James" <[EMAIL PROTECTED]> wrote:
> word = raw_input("Type a word:")
> start = len(word)
>
> for letter in range(start, 0, -1):
> print letter
Hi James,
for letter in reversed(word):
print letter
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
len(score_costs)
score_costs = zip(base_scores, score_costs)
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
perties of your class like
this:
class MyClass(object):
... add this at the end of your class definition ...
def _getu(self): return self.y[1]
def _setu(self, u): self.y[1] = u
u = property(_getu, _setu)
... and similarly for du, V
Using these two tricks, your code line would be:
s.du = s.a * (s.b * s.V - s.u)
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
l is complicated: it has some
advanced features, but for what you seem to be doing it should be easy
to replace your 'Number' with it. In fact, it makes things simpler
since you don't have to worry about 'scale'.
Your examples convert easily:
from decimal import Decim
x27; and number == 5:
> raise letters.StopIteration()
Have you checked out http://www.python.org/dev/peps/pep-3136/
It contains exactly this idea, but using 'break letters' rather than
'raise letters.StopIteration()'. I think I like the PEP's syntax
bett
st([1, 2, 3])
>>> x[1] = 4
setting 1 to 4
>>> x
[1, 4, 3]
If users of your class are allowed to replace attributes with their
own lists, you'll have to catch these and convert to NotifyingLists;
and it may be somewhat messy.
I hope this is useful to you.
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
riginal code, but the 'else' is
attached to the 'for' rather that the 'if'!
Finally, in Python 2.5 you can write this:
if not any(letter in word for letter in avoid):
print word
I think this is the best solution, as it's readable and short.
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
ing it, what is the more pythonic
> way of doing this?
Use the builtin 'sum' function.
sum(a + b for a, b in zip(xrange(1, 51), xrange(50, 0, -1)))
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
h more
cleanly...
def partitions(n, length):
"""Generate all sequences of positive numbers of the given
length that sum to n."""
assert 0 < length <= n
if length == 1:
yield [n]
return
for i in xrange(1, n + 2 - length):
for p in partitions(n - i, length - 1):
yield [i] + p
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
s"*(len(d)-1)) % tuple(d)
>
> but this fails for d = []
>
> any (pythonic) options for this?
print ', '.join(d)
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
count += 1
yield '\n'
yield '\n'
yield '\n***\n'
You can make the string using ''.join:
dmntString = ''.join(dmntGenerator())
But if you don't need the string, just write straight to the file:
for part in dmntGenerator():
dmntFile.write(part)
This is likely to be a lot faster as no large string is produced.
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
familiar with it, rather than because of scalability problems? Perhaps
using python is actually a competitive advantage for your company?
Have you seen this?
http://www.paulgraham.com/pypar.html
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
:
>
A nice variant of this, which minimizes repetition, is to group all
the factory methods together into a class, naming them the same as the
keyword...
class Builder(object):
def SECTION(self):
...
def COMPOSITION(self):
...
def OBSERVATION(self):
...
def ITEM_TREE(self):
...
builder = Builder()
for word in parse_list:
item = getattr(builder, word)()
...
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
;
> >>> magic_function('[EMAIL PROTECTED]')
>
> str: 'si_98udasgf'
For speed, you can use 'string.translate', but simplest is to use a
comprehension:
import string
def magic_function(s, keep=string.ascii_letters + string.digits +
'_'):
re
gt; return ( version_text [0] [0] )
>
> But is there a way to avoid the placing of this function "version" in
> each module,
> and still use a simple call like:
> .version()
You could use version() instead of module.version(), and just
declare 'version' in one place. Presumably you already have a module
for getting the metadata out of one of your modules; perhaps it could
go in there?
def version(module):
return getattr(module, 'Version_Text')[0][0]
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
ptions]
perm, auth, arg, path = options
assert perm is None or perm in 'ae...'
assert auth is None or auth == 'A'
assert arg is None or arg == 'R'
assert path is None or path == 'P'
ftp_commands[cmd] = CommandProperty(perm=perm, auth_required=auth,
arg_required=arg, check_path=path, syntax = '%s %s' % (cmd, help))
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
ime.html
-- says that '%X' is the locale's appropriate time representation, so
obviously gtk is adjusting your locale. Perhaps use a formatting
string that doesn't depend on the locale: '%H:%M:%S' instead of '%X'
seems to give your preferred format.
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 3, 8:12 am, binaryjesus <[EMAIL PROTECTED]> wrote:
> On Aug 3, 1:46 am, Paul Hankin <[EMAIL PROTECTED]> wrote:
>
>
>
> > On Aug 2, 10:35 pm, binaryjesus <[EMAIL PROTECTED]> wrote:
>
> > > hi i am working on a S3 project and facing a really w
t to debug. Your code is
well written, and you've already reached the limits of the power of
regexps, and it's difficult to read.
Have a look at pyparsing for a simple solution to your problem.
http://pyparsing.wikispaces.com/
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
n the first
one is found. Using 'in' rather than testing the return value of find
is nicer as a substring test. Finally, using the 'else' clause lets
you make it clear that answer is set to the empty string when no match
is found.
for answer in l:
if str in answer: break
else:
answer = ''
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
, -2) # (-5, -1)
Both C and Python define q = a / b and r = a % b to satisfy a = q * b
+ r, where -abs(b) < r < abs(b).
Where they differ:
Python: r has the same sign of b (or 0).
C99: r has the same sign as a (or 0).
C89 (Standard C): It's implementation defined what sign r has if
either a or b is negative.
This means python already has C-like behaviour... it's compatible with
standard C, although not with C99.
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
header = '_'.join(x.capitalize() for x in
header.split('-'))
setattr(self, header, value)
You may want to add some error checking though!
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
seful update-in-place behaviour when the left-hand-
side of the += expression is a list.
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
t;,
> "Perl":"15th June",
> "Java":"7th June",
> "Python":"26th May",
> "Tcl":"12th July",
> "MySQL":"24th May"}
>
> topics = info.keys()
> topics
, but here's a compact way
to write what you want.
import heapq
def mostfreq(message):
return heapq.nlargest(3, set(message), key=message.count)
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
rm list3 that contains
> elements from list1 with indexes from list2, i.e.
list3 = [list1[i] for i in list2]
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
use it...
for previous, (key, value) in iterprevious(d.iteritems()):
... In the loop, previous will either be None if we're on the
first element, otherwise (previous_key, previous_value).
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
stmt2
stmt3
stmt4
This is probably the right way to write it in C too.
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
== IN[j].coordinates[0] and
> if IN[i].coordinates[1] == IN[j].coordinates[1]:
A simple O(N) algorithm:
from collections import defaultdict
d = defaultdict(int)
for x in IN:
d[x] += 1
SN = [x for (x, c) in d.iteritems() if c > 1]
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
label)
Using only a little extra storage to compute IN (but O(N log N)
time complexity):
import itertools
IN.sort()
SN = [k for k, v in itertools.groupby(IN) if len(list(v)) > 1]
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
x27;Warning!'? That's odd... :o Crazy, what am i not seeing? :(
>
> we're not seeing all the relevant code. While I can ignore the missing
> import, I don't see any creation of the variables WarnTimeout and
> CritTimeout. Simplest explanation that fits your sample run is that
> they are not of type float.
Yes, and most likely str. A good debugging tip is to use repr rather
than str to print out debugging messages.
--
Paul Hankin
--
http://mail.python.org/mailman/listinfo/python-list
101 - 184 of 184 matches
Mail list logo