not understanding that they
are not necessarily going to the same position. The fact that they
provide an ambiguous display is enough to make them evil.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
stemExit, e: pass # Failure. Patch and try again
else: break # Successful run, no need to retry.
print '*** Apparently a failure:', e.args[0]
print '*** Patching and trying again'
import patch_msvccompiler
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> It didn't work with visual studio 5. .Net framework 2.0
> Do you have any suggestions?
"It didn't work" is not very diagnosable.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
e).
>
> Thank you for any answer
> Regards
> Michal
The two ways to detect a string's encoding are:
(1) know the encoding ahead of time
(2) guess correctly
This is the whole point of Unicode -- an encoding that works for _lots_
of languages.
--Scott David Daniels
[EMAIL PR
= name + '.log'
outputFile = open(os.path.join(root, name + '.log'), 'w')
outputFile.write(str(table))
outputFile.close()
table = {}
So that you only write logs if something was found.
--
-Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
u try to get onto the desktop.
Don't be so concerned about "having to learn too much" -- that learning
is the whole point of initial projects. You don't know what you need
to know now, so you are not in a position to make a well-informed choice
of what you need to know.
--
-Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
to,
those differences leave something to choose. You should
always feel free to grab the most recent matching the first
two digits.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
te a paragraph or two that would have
informed you and send it to the destination mentioned on the
documentation page.
--
-Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
alling to do.
See, for example:
http://www.vrplumber.com/programming/mstoolkit/
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
John Marshall wrote:
> For strings of > 1 character, what are the chances
> that hash(st) and hash(st[::-1]) would return the
> same value?
Why not grab a dictionary and do the stats yourself?
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
John Marshall wrote:
> Scott David Daniels wrote:
>> ... Why not grab a dictionary and do the stats yourself?
> I was actually interested in the mathematical/probability
> side rather than the empirical w/r to the current
> hash function in python.
Well, the probability depends o
ladly take care of that
--
-Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
Harlin Seritt wrote:
> from utilities import *
> from extractor import *
> import time
...
> data = os.popen(line).readlines()
> time = data[-1].split()[-1][:-2]
This seems an unfortunate choice of names.
> except:
> ...
--Scott
[EMAIL PROTECTED] wrote:
> Scott David Daniels wrote:
...
>> Perhaps you could write a paragraph or two that would have
>> informed you and send it to the destination mentioned on the
>> documentation page.
>
> Yes, but I was hoping to get some sense of how such
>
So you can just use
@Memoize
def function (
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
Aahz wrote:
> QOTW: Timbot makes an error ;-)
Now exactly who was in charge of the replacement capacitors?
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
> """ Three throws should result in expected score """
self.assertEqual(5 + 7 + 4, self.runs([5, 7, 4]))
> def test_strike(self):
> """ Strike should add the following two throws """
throws = [5, 4]
frame = 2
class Test_three(Test_Game):
score = 14
throws = [5, 4, 5]
frame = 2
class Test_strike(Test_Game):
score = 26
throws = [10, 4, 5, 7]
frame = 3
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
r.com/programming/mstoolkit
I also have some code to "monkey patch" distutils (change at runtime
without having to alter any source code) if distutils seems to
be the problem.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
scope for x, goes out of scope at end of if
>>
> If this genuinely troubles you then you can always isolate the scope
> with a function, though of course you also no longer have the code
> inline then.
Or, if you must:
def called(function):
function()
return called
then:
see the output on a terminal display (some stdout
C systems are line buffered).
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
t;>> int(a,16) # Silly me, 0xe is not a decimal
> 14
Or even say "look to the text for a clue about the base":
>>> int('0xe', 0)
14
>>> int('010', 0)
8
>>> int('10', 0)
10
--
-Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
lambda is used too often in lieu of deciding what to write.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
David Bolen wrote:
Scott David Daniels <[EMAIL PROTECTED]> writes:
while test() != False:
...code...
I'm not sure I follow the "error" in this snippet...
The code is "fat" -- clearer is:
while test():
...code...
The right s
gs in this thread,
"Codito ergo sum"
brings to mind one I love:
"Cogito ergo spud!" -- I think, therefore, yam!
(a U.S. Thanksgiving day coinage).
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
and writable views.
Have a look at:
http://members.dsl-only.net/~daniels/Block.html
to see if it addresses your problem. It is MIT-licensed (give credit,
but feel free to use). Let me know if it works OK, could use a tweak,
or is completely useless. I'll be more than happy to r
Bo Peng wrote:
Scott David Daniels wrote:
I wrote "blocks and views" to overcome this problem.
I was too impatient to wait for your reply. :-)
I call 21-hour turnaround over New Year's Eve pretty good. Clearly I
will never be quick enough for you ;-). Since I presented this a
n, and it has a field "args" which will reflect the
arguments with which the exception was created. So in these
cases, x.args is ('some message',) and if the code were:
>>> try:
... raise ValueError("some message", 42)
... except ValueErro
for x in seq:
try:
for y in flatten(x):
yield y
except TypeError:
yield x
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
ed, you can then march through the lists in parallel, which should
give you an O(n) algorithm.
But overall you will have O(n log n) because of the sorts.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
rather than a strict
guarantee of the type, code can be generated that does the test
before choosing which path to choose, and have fast code on the
type-specific path.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
nerally
accepted view was that this company would either produce a
spectacularly fast machine, or at least one of them would be dead.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
:\Python24\Python.exe C:\Python24\Lib\idlelib\idle.pyw
I suspect your real problem is the internal firewall in XP,
in which case you'll need to allow building sockets to LOCALHOST
(127.0.0.1) on port 8833, or, alternatively, start idle with the
"-n" flag.
--Scott David Daniels
How about (for 2.4 or 2.3 using "from collections import Set as set":
def combine(source, special='foo'):
parts = set(source)
if special in parts:
return ', '.join([special] + list(parts - set([special])))
return ', '.join(parts)
--Scott
quests/MacEnthon
I seem to remember discussion about synchronizing with the windows 2.4
version to have essentially the same list.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
ovely property). There is another property
which hasn't been mentioned:
As written, only the key and the index are compared.
Try sorting:
tricky = [dict(a=5j, b=1), dict(a=4j, b=1)]
or:
similar = [(5j, 1), (4j, 1)]
without the index.
--Scott David Daniels
[EMAIL PROTECTED
)), dupelim(German)), dupelim(Czech)):
Ponly.write(unmatched)
English.seek(0)
German.seek(0)
Czech.seek(0)
Polish.seek(0)
for matched in inboth(inboth(dupelim(Polish), dupelim(English)),
inboth(dupelim(German), dupelim(Czech))):
Martin MOKREJÅ wrote:
But I don't think I can use one-way hashes, as I need to reconstruct
the string later. I have to study hard to get an idea what the proposed
> code really does.
Scott David Daniels wrote:
Tim Peters wrote:
Call the set of all English words E; G, C, and P s
f you allow
non-ASCII characters in symbol names, your source code will be
unviewable (and uneditable) for people with ASCII-only terminals,
never mind how comprehensible it might otherwise be. It is a
least-common-denominator argument, not a "this is better"
argument.
-Scott David
han using some fancy algorithm coded completely in
python.
If these queries happen often, build a dictionary of sorted letters to
lists-of-words. The setup will be slow, but use of such a secondary
dictionary should be quite fast, with relatively easy dealing with ?s
by iterations.
--Scott Dav
[EMAIL PROTECTED] wrote:
Scott David Daniels wrote:
If you allow
non-ASCII characters in symbol names, your source code will be
unviewable (and uneditable) for people with ASCII-only terminals,
never mind how comprehensible it might otherwise be.
So how does one edit non ascii string literals at
mplex numbers to communicate.
-Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
is the future, Numeric is the "past", but in the present
Numeric is better (and more mature) at some stuff than Numarray.
Learning both is not much harder than learning one, actually (they
share a lot).
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
mean by multiple Python versions.
For example, for Windows 2K/XP, As long as you try for only
distinct major versions (2.2.x, 2.3.x, 2.4.x). There should
not be a problem. The primary issues are where (and how) does
your system get to the python files.
--Scott David Daniels
[EMAIL PROTECTED]
--
ht it might be an exponent,
since it seemed to have too many on bits in a row to be part of 1.11.
-Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
G.Franzkowiak wrote:
Scott David Daniels schrieb:
franzkowiak wrote:
I've read some bytes from a file and just now I can't interpret 4
bytes in this dates like a real value. An extract from my program:
def l32(c):
return ord(c[0]) + (ord(c[1])<<8) + (ord(c[2])<<
G.Franzkowiak wrote:
Scott David Daniels schrieb:
If you really want to do this kind of byte fiddling:
http://members.dsl-only.net/~daniels/block.html
Then:
from block import Block, View
b = Block(4) # enough space for one float (more is fine)
iv = View('i', b) # gettin
make sure it doesn't impose
an extra constraint on all terminal access.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
def __init__(self, calculate_function):
self._calculate = calculate_function
def __get__(self, obj, _=None):
if obj is None:
return self
value = self._calculate(obj)
setattr(obj, self._calculate.func_name, value)
return value
class Foo(object)
he language, but it might be a good library borrow
to find out why the language is the way it is.
-Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
save paper during
your tests. It is a windows printer driver that creates a PDF file:
http://sourceforge.net/projects/pdfcreator/
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
if isinstance(value, Robot)] # actual class name here
Note, however, that
a = b = CreateRobot()
will give two different names to the same robot.
And even:
Karl = CreateRobot()
Freidrich = CreateRobot()
for robot in (Karl, Freidrich):
robot.move()
Will have two names for "Fre
mport Data
blah = Data(some_field=3, other_field=13)
...
blah.other_field = 23
...
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
27;file')
sys.stdout, old = open('somefile.txt', 'w'), sys.stdout
s.print_stats()
sys.stdout, old = old, sys.stdout
old.close()
Looks to solve your problem to me.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
uld require huge
> complexity increases in my apps (not using them would probably
> at least triple the amount of code required in some cases).]
You could check to see if the Python 2.5 pickling does a better
job. Otherwise, you've got your work cut out for you.
-Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
>>> d = 123456789
> >>> c == d
> 1
> >>> c is d
> 0
>
...
> First of all, a lot of Python values except 1 (a.k.a. True)
> are logically true in a Python expression
Actually, True and 1 are interesting examples.
>>> a, b = 1, True
&g
Grant Edwards wrote:
> On 2005-06-22, Scott David Daniels <[EMAIL PROTECTED]> wrote:
>>>...Under Win32, the pickle module only works with a subset of
>>> floating point values. In particular ... infinity or nan ...
>>
>>There is no completely portable way
(3) There is no standard-conforming way to detect these values.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
/site-packages/Numeric/FFT/__init__.pyc'
>
Much shorter is:
> import FFT
> FFT.__file__
<>
Note that (after the above):
> import sys
> sys.modules['FFT'] is FFT
True
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
Grant Edwards wrote:
> On 2005-06-22, Scott David Daniels <[EMAIL PROTECTED]> wrote:
>>Several issues:
>
>
>>(1) The number of distinct NaNs varies among platforms.
>
> According to the IEEE standard, there are exactly two:
> signalling and quiet, a
Paul Rubin wrote:
> Scott David Daniels <[EMAIL PROTECTED]> writes:
>
>>>Negative 0 isn't a NaN, it's just negative 0.
>>
>>Right, but it is hard to construct in standard C.
>
>
> Huh? It's just a hex constant.
Well, -0.0 doesn't
bar()
except Exception, exception:
addinfo(exception, "While doing x:")
raise
except Exception, exception:
addinfo(exception, "While doing y:")
raise
except Exception, exc
Nicolas Fleury wrote:
> Scott David Daniels wrote:
>
>> How about dropping reraise and changing:
>> reraise(...)
>> to:
>> addinfo(...)
>> raise
>
>
> It doesn't work, or at least it doesn't do what I want. I
uot;remove greatest",
"find arbitrary",
"remove arbitrary",
"add entry"
Depending on your choice on costs, the data structure changes.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
ss dict and provide get/set that always insert the value
> as a key. So dict["string"]=time also means dict[time]="string".
> Or am I missing something?
Yup, getting to min and max. I presume that will be key-dependent.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
t;baz"="blah"}
>
> This smacks of creeping featurism. Is this actually useful in real code?
Yes it's useful, and it grew organically from the keyword arg syntax.
No new syntax was introduced to provide this; the existing syntax was
used.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
gt; work reliably in Python with constants, which isn't very useful.
Look at the Self language. That language has less of a surface concept
of type than Python (classes are not defined). Still, Self was/is used
as a platform to investigate type inferencing, code specialization, and
native code generation.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
Peter Otten wrote:
> Christos TZOTZIOY Georgiou wrote:
>
>>and then, apart from t-shirts, the PSF could sell Python-branded
>>shampoos named "poetry in lotion" etc.
>
> Which will once and for all solve the dandruffs problem prevalent among the
> snake community these days.
And once again the P
http://www.handysoftware.com/cpif/
...
"Why teach computer programming to teenagers? For the same reason
you would teach them piano or any other musical instrument. Consider
the computer an instrument for the mind."
I've not seen the book myself, but it seems like it is targeted
to very nearly your situation, so I'd investigate it.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
ess the enter key to exit.")...
>
> Your programm gives an error. You are trying to concatenate strings with
> integers.
>
Might I suggest you were looking for this:
...
print "Heads: ", heads
print "Tails: ", tails
print &
Ron Adam wrote:
> Mike Meyer wrote:
>
>> Riccardo Galli <[EMAIL PROTECTED]> writes:
>>> result = [value2,value1][cond]
Or:
result = [(lambda: expr0), lambda: expr1][cond]()
Which is harder to understand than the if-based assignment even
with 5-character expressio
Roy Smith wrote:
> Andrew Durdin <[EMAIL PROTECTED]> wrote:
>>Corrected version:
>>result = [(lambda: expr0), lambda: expr1][bool(cond)]()
Sorry, I thought cond was a standard boolean.
Better is:
result = [(lambda: true_expr), lambda: false_expr][not cond]()
--Scott
tra zip.
You could try timing it using itertools.izip rather than zip.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
port myModule.py
Does this work for you? It gives me a syntax error.
Typically, put the zip file on the sys.path list, and import modules
and packages inside it. If you zip up the above structure, you can use:
sys.path.insert(0, 'myZip.zip')
import base.branch1.myModule
--
self, *args, **kwargs):
super(foo, self).__init__(self, *args, **kwargs)
...
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
Delaney, Timothy (Tim) wrote:
> Grant Edwards wrote:
>
>
>>On 2005-06-30, Delaney, Timothy (Tim) <[EMAIL PROTECTED]> wrote:
>>
>> Due to some wierd property requiring conservation of
>> consonants, when speaking Strine you've got to take the r's
>> removed from words like "carrier" and "order", a
it.
Even if uncompressed, the zip archive format is not going to
happily allow you to change the size of any of the "files" it
stores.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
mess that the design goals
themselves are at fault for the big hairy mess.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
to be easily runnable for all developers
is going to be tough for "third party programs." Making the interfaces
work for differing versions of the 3PPs as the third parties themselves
change their interfaces (see fun with Tcl/Tk versions for example), and
building testbeds to test to all of
ften have a level of indirection that allows it to
simply tweak an indirection table to implement this method.
The reason I find it terrifying is that I can be passed an object,
place it in a dictionary (for example) based on its value, and then
it can magically be changed into something else wh
Bengt Richter wrote:
> On Thu, 30 Jun 2005 08:54:31 -0700, Scott David Daniels <[EMAIL PROTECTED]>
> wrote:
>>Or, perhaps:
>>class foo(object):
>>def __init__(self, *args, **kwargs):
>>super(foo, self).__init__(self, *args, **kwargs)
>
en a function taking no args and
its result.
3) Python doesn't have a full set of functional primitives.
Fold-right is one example, K-combinator is another,
Why pick on reduce as-is to keep? There is another slippery
slope argument going up the slope adding functional primitives.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
Paul Rubin wrote:
> Python 2.4, Windows XP. If I say:
> f = Frame()
> f.grid()
> v = IntVar()
v.set(1) # Might help. v.get() at this point returned 0 for me.
> c = Checkbutton(f, text='hi there', variable=v)
> c.grid()
> f.mainloop()
--
http://mail.python.org/mailm
unds a lot like
whining.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
l does not respond to message abc."
My first reaction was always, "of course it doesn't, this message is
useless." You really want the error to happen as close to the problem
as possible.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
eresting community of users. These
> probably make most of the difference.
Well said. Writing speed is not everything; if it is, APL and Scheme
win (and the evil Perl for string processing).
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
d Python's data structures
to do that kind of work.
--Scott David Daniels
--
http://mail.python.org/mailman/listinfo/python-list
ot just for speed). In
older pythons the == result wasn't necessarily same as is-test.
This made sense to me after figuring out NULL in database stuff.
is-test will always work for None despite the other half. Not
so for bogus objects like:
>>> class WildCard(object):
d
Gui
else:
raise "os %s not supported" % os.name
class Installer(object):
def __init__(self, guiFactory):
self.gui = guiFactory(self)
def main():
inst = Installer(makeGui)
return inst.gui.main()
--Scott David Daniels
[EMAIL PROT
;small" ints use a single identity can lead you to a mistaken belief
that equal integers are always identical.
>>> (12345 + 45678) is (12345 + 45678)
False
'is' tests for identity match. "a is b" is roughly equivalent to
"id(a) == id(b)". In
print a, abc
a = Example(1,2)
print a.__dict__
print a.a
print a.abc
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
I was wondering if
> there are any better ways.
>
import zipfile
z = zipfile.ZipFile('block.zip')
names = [name[7:] for name in z.namelist()
if name.startswith('others/')]
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
gt;>or "give me the first tuple whose 2nd element is y".
iter(elem in lst if elem[3] == x).next()
Does this look any better? At least it stops when the answer is found.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
the first one work. Further why
> didn't the first one return an error?
result = [line[1 : -5].split('\"\t\"') for line in lines]
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
for c in thefile.read():
Or, if you did not want to do a full read:
def filechars(afile):
for line in afile:
for char in line:
yield char
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
eval("dothat(x,y)", None, (('x', 100), ('y', 200)))
>> the right way to have it executed?
You do know that you could do something like:
result = eval('dothat')(100, 200)
That is, eval of the function name gives you a function.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
emy
>
If you have 2.4 or later:
def mtime(filename):
return os.stat(filename).st_mtime
lst = sorted(glob.glob('*'), key=mtime)
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
y
You should then be able to do something like:
import zipf
z = zipf.ZipFile('whatever.zip', 'a')
and then copy the code for .write(...)
using your own zinfo block. I imagine I'll eventually have a method
like that named ".write_info(zinfo, data_itera
an unknown
quantity -- the phrase is usually only applied to horses that show well
without the normal track record preceding that success.
--Scott David Daniels
[EMAIL PROTECTED]
--
http://mail.python.org/mailman/listinfo/python-list
Felix Collins wrote:
> Hi,
> I'm not a regexp expert and had a bit of trouble with the following search.
> I have an "outline number" system like
> 1
> 1.2
> 1.2.3
> I want to parse an outline number and return the parent.
Seems to me regex is not the way to go:
def parent(string):
601 - 700 of 2114 matches
Mail list logo