idea.
> "It was MY idea!!!" "No, it's NOT!!!" "Is TOO!!!"
That's what happens when you try to teach 6th graders about intellectual
property: they revert back to two year old mentality.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
Pierre Barbier de Reuille wrote:
> Proposal
>
>
> First, I think it would be best to have a syntax to represent symbols.
> Adding some special char before the name is probably a good way to
> achieve that : $open, $close, ... are $ymbols.
How about using the prefix "symbol." instead of "
Fredrik Lundh wrote:
> Steven D'Aprano wrote:
>
>
>>This means we're no longer assuming what the error message will be,
>>which makes our code a lot more future-proof and implementation-proof: if
>>some version of Python changes the error string from "i
.
>>> iter
Traceback (most recent call last):
File "", line 1, in ?
NameError: name 'iter' is not defined
What should I do when I can't rely on functions that
don't exist in older versions of Python?
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
is not quite as
future-proof as I thought it was. Since a better
solution does exist, I agree it should be used in
preference to my crappy one, assuming you are running a
recent enough version of Python.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
t's right, they are the Authorities, and
the Authorities can do no wrong.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> The "Python LIbrary Reference" at
> http://docs.python.org/lib/contents.html seems to be an important
> document. I have two questions
>
> Q1. How do you search inside "Python LibraryReference" ? Does it exist
> in pdf or chm form?
One other option. Go to google and us
Ok, so I have a module that is basically a Python wrapper around a big
lookup table stored in a text file[1]. The module needs to provide a
few functions::
get_stem(word, pos, default=None)
stem_exists(word, pos)
...
Because there should only ever be one lookup table, I feel lik
Terry Hancock wrote:
> On Thu, 17 Nov 2005 12:18:51 -0700
> Steven Bethard <[EMAIL PROTECTED]> wrote:
>
>>My problem is with the text file. Where should I keep it?
>>
>>I can only think of a few obvious places where I could
>>find the text file at import
Larry Bates wrote:
> Personally I would do this as a class and pass a path to where
> the file is stored as an argument to instantiate it (maybe try
> to help user if they don't pass it). Something like:
>
> class morph:
> def __init__(self, pathtodictionary=None):
> if pathtodictiona
So I've recently been making pretty frequent use of textwrap.dedent() to
allow me to use triple-quoted strings at indented levels of code without
getting the extra spaces prefixed to each line. I discovered today that
not only does textwrap.dedent() strip any leading spaces, but it also
substi
[EMAIL PROTECTED] wrote:
0xL
>
> 4294967295L
>
> OK, this is what I want, so I tried
>
> s = long("0xL")
> ValueError: invalid literal for long(): 0xL
>>> int("0x", 0)
4294967295L
STeVe
--
http://mail.python.org/mailman/listinfo/python-list
languages, for instance French and Italian, and
sometimes Dutch. When used as quote marks, the French term guillemet is
sometimes used as synonym for chevron.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
change from
version to version, and is not generally true:
py> x = 0; y = 3-3
py> x == y
True
py> x is y
True
py> x = 35791; y = 3579*10+1
py> x == y
True
py> x is y
False
So in general, there can be many instances of int with the same value.
That's not
t can I do?
>>
>> Thank you in advance.
>> Stefan
>
> Leave out the "0x" prefix and tell long() that you're using base 16:
>
>>>> long("", 16)
> 4294967295L
Or leave the prefix in, and tell Python to use the prefix to predict the
base:
py> long("0xL", 0)
4294967295L
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 18 Nov 2005 17:49:50 +, Leif K-Brooks wrote:
> Sion Arrowsmith wrote:
>> Steven Bethard <[EMAIL PROTECTED]> wrote:
>>
>>>[EMAIL PROTECTED] wrote:
>>>
>>>>s = long("0xL")
>>>>ValueErro
you find a way to make water not wet and three-sided
squares, then you can turn your mind towards solving the *really* hard
problem: how to make bytes not copyable.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
ned way?
if cond:
x = true_value
else:
x = false_value
It is easy to read, easy to understand, only one of true_value and
false_value is evaluated. It isn't a one-liner. Big deal. Anyone would
think that newlines cost money or that ever time you used one God killed a
kitten.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
tes string literals:
"abc" "def" is the same as "abcdef".
Perhaps Python should concatenate numeric literals at compile time:
123 456 is the same as 123456.
Off the top of my head, I don't think this should break any older code,
because 123 456 is not currently
On Fri, 18 Nov 2005 21:05:50 -0800, [EMAIL PROTECTED] wrote:
> Steven D'Aprano wrote:
>> WHY WHY WHY the obsession with one-liners? What is wrong with the good old
>> fashioned way?
>>
>> if cond:
>> x = true_value
>> else:
>> x = false_
, you should be able to rebind enums and face
the consequences (good bad or indifferent) as best you can.
Possibility (3) is the logical solution. It shouldn't matter what labels
we put on the enums. But I fear not practical unless the enums are
implemented as Singletons (multitons?), and perhaps not even then.
Alternatively, you could bypass the whole problem by making enums
immutable.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 19 Nov 2005 01:33:40 -0800, bearophileHUGS wrote:
> Steven D'Aprano:
>> Perhaps Python should concatenate numeric literals at compile time:
>> 123 456 is the same as 123456.
>
> I think using the underscore it is more explicit:
> n = 123_456
It is also easy
Peter Hansen wrote:
> Steven Bethard wrote:
>
>> Note that even though the tabs are internal, they are still removed by
>> textwrap.dedent(). The documentation[1] says:
>
> ...
>
>> So it looks to me like even if this is a "feature" it is undocument
rbitrary bases is not, in my opinion,
common enough a task that support for it needs to be built into the syntax
for literals. If somebody cares enough about it, write a module to handle
it and try to get it included with the Python standard modules.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 20 Nov 2005 08:56:33 +1100, Ben Finney wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>> On Fri, 18 Nov 2005 14:32:46 +1100, Ben Finney wrote:
>> > Is there any difference between a Python immutable value, and a
>> > constant? I suppose "c
On Sun, 20 Nov 2005 01:39:04 +, Steve Holden wrote:
> Steven D'Aprano wrote:
> [...]
>> Likewise, base conversion into arbitrary bases is not, in my opinion,
>> common enough a task that support for it needs to be built into the syntax
>> for literals. If somebody
ill close the file eventually, but you can't guarantee when.
> And what shoud I do if I want to explicitly close the file immediately
> after reading all data I want?
That is the best practice.
f.close()
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 19 Nov 2005 22:51:04 -0500, Mike Meyer wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> writes:
>> Brackets include:
>>
>> parentheses or round brackets ( )
>> square brackets [ ]
>> braces or curly brackets { }
>> chevrons or angle brack
ieve Python will take advantage of your file system's buffering
capabilities. Try it and see, you'll be surprised how fast it runs. If you
try it and it is too slow, then come back and we'll see what can be done
to speed it up. But don't try to speed it up before you know if it is fast
enough.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 20 Nov 2005 16:10:58 +1100, Steven D'Aprano wrote:
> def get_line(filename, token):
> """Returns the next line following a token, or None if not found.
> Leading and trailing whitespace is ignored when looking for
> the token.
> "&qu
ill be enough to justify
changing the way Python handles numeric literals -- Guido seems quite
conservative in what he adds to the language, so unless there is either
great demand or it scratches a particular itch he has personally, I doubt
it will fly. But we'll never know unless we try, hey
in any reasonable time. Numeric programming
often uses magic constants which truly are "magic" (in the sense that
where they come from requires deep, difficult, and sometimes hidden
knowledge).
Nobody sensible wants to be typing in long strings of digits, but
sometimes it is un
edit distance of
dist from the target.
"""
found = []
for s in strlist:
if levenshtein(s, target) <= dist:
found.append(s)
return s
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
it does do that it shouldn't?
You could do it this way:
# untested
def cumulative_sum(L):
CL = []
csum = 0
for x in L:
csum += x
CL.append(csum)
return CL
Whether it is better or worse depends on what you
consider better or worse.
--
Steven.
--
(item)
return U
The trick you are trying to do with _ is undocumented and, even if you get
it to work *now*, is probably not going to work in the future. Don't do it.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
The setup: I'm working within a framework (designed by someone else)
that requires a number of module globals to be set. In most cases, my
modules look like:
(1) a class definition
(2) the creation of one instance of that class
(3) binding of the instance methods to the appropriate module global
welve, not
three. With len(cat)=3 and len(hippopothamus) = 13, you need ten
insertions just to get the lengths equal, so the L-distance must be at
least ten.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> Steven D'Aprano wrote:
>
>
>>Alas and alack, I have to write code which is backwards
>>compatible with older versions of Python:
[snip]
>>What should I do when I can't rely on functions that
>>don't exist in older versio
es should be set for life.
Hah, I wish!
Thanks for the assistance, I learnt a lot. Let's hope I
don't have to use it ever again...
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
tuff
>
> But math folks usually name things after the person(s) who came
> up with the idea, not just some random implementer.
No no no! In maths things are usually named after Euler, or the first
person to discover them after Euler.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
x27;b', 2), ('c', 3)]
If you absolutely need the inner tuples to be lists, use a list
comprehension afterwards:
[list(t) for t in zip(['a', 'b', 'c'], [1, 2, 3])]
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
fall to my knees in admiration of a Cool Hack,
or recoil in horror at a Bogus Kludge :-)
The code looks like it should return [('a', 'a'), (1, 1), ('b', 'b'), (2,
2), ('c', 'c'), (3, 3)] but of course it does not: the arguments for zip
are not independent.
I guess it is more of a Neat Trick, with a dash of Gotcha For The Unwary.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
he whole sample string and check the
> condition,
Yes. Where does the string come from? Can a hostile user pass bad strings
to you and crash your code?
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
Mardy wrote:
> I'm not sure I got your problem correctly, however see if this helps:
>
> $ cat > test.py
> class myclass:
> name = __module__
> ^D
>
[snip]
>
> >>> import test
> >>> a = test.myclass()
> >>> a.name
> 'test'
>
> This works, as we define "name" to be a class attribute.
> Is th
t
flexible is a combination of (3) and (4). Python now has that with sort()
and sorted(). Prior to the addition of sorted() to the language, (3) was
considered the best solution because of a simple Python principle: never
duplicate objects unless explicitly told to.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
) the safest position is to claim
you've never read a book, seen a line of code, been to the movies or heard
a song in your life.
(Only half joking.)
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
x that I don't object to, although that's not saying
much. In mathematics, there are operators of a plus sign within a circle,
multiply sign within a circle, etc. The closest we can get in plain ASCII
would be:
m0(+)m1
m0(*)m1
m0(-)m1
etc.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
[Duncan Booth]
> >>> aList = ['a', 1, 'b', 2, 'c', 3]
> >>> it = iter(aList)
> >>> zip(it, it)
>[('a', 1), ('b', 2), ('c', 3)]
[Alan Isaac]
> That behavior is currently an accident.
>http://sourceforge.net/tracker/?group_id=5470&atid=105470&func=detail&aid=1121416
[Bengt Richter]
> That sa
[EMAIL PROTECTED] wrote:
>> > ii. The other problem is easier to explain by example.
>> > Let it=iter([1,2,3,4]).
>> > What is the result of zip(*[it]*2)?
>> > The current answer is: [(1,2),(3,4)],
>> > but it is impossible to determine this from the docs,
>> > which would allow [(1,3),(2,4)] inste
[EMAIL PROTECTED] wrote:
> Steven D'Aprano wrote:
>
>>There are four possibilities for a construction like list.sort():
>>
>>(1) sort the list in place and return a reference to the same list;
>>(2) sort the list in place and return a copy of the same lis
un (say) 20 tests, and look at the
average speed. Of better still, use the timeit module.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
(Again, ignoring slots and any other special cases I
have't thought of.)
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Steven Bethard wrote:
>
>>[EMAIL PROTECTED] wrote:
>>
>>>>>ii. The other problem is easier to explain by example.
>>>>>Let it=iter([1,2,3,4]).
>>>>>What is the result of zip(*[it]*2)?
>>>>>The
On Wed, 23 Nov 2005 00:17:32 -0800, [EMAIL PROTECTED] wrote:
>
> Steven D'Aprano wrote:
>> [EMAIL PROTECTED] wrote:
>>
>> > Is there somthing wrong
>>
>> Kids today, don't they learn about inheritence? :-)
[snip]
> I believe he knows ab
olution is fine. But just to prove it can be done:
dNewDataFields['CODE'] = dOldDataFields['CODEDATA']
dNewDataFields['DATE'] = dOldDataFields['DATE']
if dOldDataFields['CONTACTTYPE'] == 2:
dNewDataFields['CONTACT'] = dOldDataFields['FIRSTCONTACT']
else:
dNewDataFields['CONTACT'] = dOldDataFields['SECONDCONTACT']
There. The world didn't end.
*wink*
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
to GPL'd
> software as "free as in pushing my personal social agenda".
Of course you are FREE to do so, and I won't even charge you. That doesn't
make what you say meaningful.
Is the Python licence not "pushing my personal social agenda" too? What
about proprietary licences that prohibit making backup copies? Doesn't
that push a social agenda too, an agenda to make it expected that every
time your software needs to be reinstalled you have to go out a buy a new
one?
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
rather
> misleading term.
>
> I still think of the term "Free Software" as false advertising.
I'm FREE to use the software, FREE to redistribute it,
FREE to give it away, FREE to make derivative works,
FREE to transfer the licence, *and* I got it FREE of
cost as well, but that doesn't make it free.
Not on Bizarro World at least.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
to break them anyway.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
roperty is almost certainly used in some
> code, so it can't be broken without good reason.
As I recall, that guarantee is only if the dict is not
modified between retrieving the keys and retrieving the
values.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
process your code is arguably a
> derivative work of the original.
"Derivative work" is not a well-formed concept. Many
copyright lawyers have made many fortunes arguing
whether or not this work or that work is a derivative
work of some other.
--
Steven.
--
http://mail.python.or
if you create an empty dict, and
then populate it one item at a time, it will take
approximately twice as long as creating the non-empty
dict directly.
As a very unscientific, system-dependent, statistically
shoddy ball-park estimate, it looks like each item
assignment to a pre-existing dict takes less than
0.002s. So if you had a dict and added another
million items to it, one at a time, it might take an
extra 0.2s in total more than what it would have taken
you if you wrote those one million items in your source
code.
I can live with that.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
rmal verification are way beyond what a normal user is capable of
> specifying, making them an even worse tool for specification.
Can't argue with that observation :-)
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 24 Nov 2005 00:26:36 -0800, [EMAIL PROTECTED] wrote:
> As for the liability, that is for sure, withness what is happening for
> the linux kernel.
What is happening for the Linux kernel?
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 24 Nov 2005 12:51:34 +, Duncan Booth wrote:
> Steven D'Aprano wrote:
>
>>> While outwardly they apear to offer a technique for making software
>>> more reliable there are two shortcomings I'm leery of. First, no
>>> verification program can
le data"). If there is no difference, I
don't understand the point of your example.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
w console game developers, is there
any company making a profit on software sales?
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
But I should have to *think about it* before messing
about with it.
Python's consenting adults philosophy allows the class designer some
limited ability to force the class user to think about it before messing
about with private variables. I think Ben's immutable class falls into
that sa
y, I release stuff under a BSD-like license, historically
> having included requirements that I be notified of bug fixes, and/or
> that I be given copies of commercial software that included my code.
That would make it NOT a BSD-like licence then.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
release your work with no restrictions whatsoever, then
just put the work in the public domain. Is attribution really that
important to you -- especially when that attribution may be buried deep in
the source code of software which nobody will ever see?
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
source
code (excepting reasonable distribution costs of shipping extra media).
Such chilling effects. That explains why Linux and other GPLed software
has languished in obscurity over the last decade, while companies like
IBM, Novell and Red Hat have flocked to support the much older
BSD-licenced co
ty of a verification program's own source code that prevents the
verification program working correctly on itself.
And that was my point: formal correctness checking programs will be as
good as testing themselves as they are at testing other programs. If you
trust them to check other programs, you have no reason not to trust them
to check themselves.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
unique in that regard is deluding themselves.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 25 Nov 2005 20:50:41 -0500, Mike Meyer wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> writes:
>> On Thu, 24 Nov 2005 11:44:16 -0500, Mike Meyer wrote:
>>> In Python, I can even fix
>>> it so *your* code uses my wrapped version:
>>>
>&g
On Fri, 25 Nov 2005 20:17:15 -0800, Alex Martelli wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>
>> On Thu, 24 Nov 2005 17:43:22 +0100, Martin P. Hellwig wrote:
>>
>> > if I owned a company
>> > making profit on software sales (sale =! su
On Fri, 25 Nov 2005 23:20:05 -0500, Mike Meyer wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> writes:
>> "Hmmm, the class designer didn't want me adding attributes to instances...
>> maybe he had a good reason for that..."
>
> When it was suggested
e to BSDs, or given money to BSD coders?
In a pig's ear they have.
Microsoft stands for closed source software: they absolutely hate the
GPL. But they like the BSD licence, because it lets them freeload
off the labour of idealistic programmers for free, without so much as a
thank you.
--
On Fri, 25 Nov 2005 20:54:55 -0500, Mike Meyer wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> writes:
>> On Thu, 24 Nov 2005 16:00:29 -0500, Mike Meyer wrote:
>> The GPL doesn't restrict distribution. I don't understand where
>> people get this bizarre view
right (c) 2005 Steven D'Aprano.
Released under the same license as used by Python 2.3.2 itself.
See http://www.python.org/psf/license.html for details, and
http://www.python.org/2.3.2/license.html for the full text of the license.
I use that as a no-brainer licence: it is weaker than but compat
On Sat, 26 Nov 2005 11:26:30 +0100, Martin P. Hellwig wrote:
> Steven D'Aprano wrote:
>> On Thu, 24 Nov 2005 17:43:22 +0100, Martin P. Hellwig wrote:
>>
>>> if I owned a company
>>> making profit on software sales (sale =! support) you sign a death wis
On Sat, 26 Nov 2005 04:59:59 -0500, Mike Meyer wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> writes:
>> On Fri, 25 Nov 2005 23:20:05 -0500, Mike Meyer wrote:
>>> If you've got a use case, I'd be interested in hearing it.
>> frozenset perhaps? If
On Sat, 26 Nov 2005 04:46:15 -0500, Mike Meyer wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> writes:
>> But if you *do* redistribute it, then you must live up to conditions in
>> the licence. If you aren't willing to do that, use software with a
>> different l
o. Then we can all agree that all software licences are
restrictive and that moral rights are restrictive ("but what if I *want*
to plagiarise the author of this public domain work?").
I think that your usage of the word is about as useful as plutonium
underwear, but if you are going to use it in that way, at least be
consistent.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
venue from licencing, not sales.
You're usage of sales may differ, and I'm not going to argue that one is
better than the other. By my meaning, Red Hat doesn't sell RH Enterprise
Linux, but charges for support. By your meaning, Red Hat does sell RHEL.
I'm good with that definition too, so long as we can agree on one or the
other.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
not revenue
from sales.
Of course you're welcome to describe it as sales. It is an arbitrary
choice one way or another -- the main thing is to not talk at
cross-purposes, as we obviously have been doing.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 28 Nov 2005 08:44:04 +, Duncan Booth wrote:
> Steven D'Aprano wrote:
>
>> Since real source code verifiers make no such sweeping claims to
>> perfection (or at least if they do they are wrong to do so), there is
>> no such proof that they are impos
how little time the deletion took :-)
Why don't you try it for yourself? You only need some quick and dirty code
to discover which approach is better (for a quick and dirty definition of
"better"). Don't forget to check out the bisect module too.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
s impossible to create a
program which will determine whether *all* programs will terminate.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
Dan Bishop wrote:
> Mike Meyer wrote:
>
>>Is there any place in the language that still requires tuples instead
>>of sequences, except for use as dictionary keys?
>
> The % operator for strings. And in argument lists.
>
> def __setitem__(self, (row, column), value):
>...
Interesting that b
ts of various types. Deprecated.'
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 28 Nov 2005 12:05:03 -0500, Mike Meyer wrote:
> Steven D'Aprano <[EMAIL PROTECTED]> writes:
>> On Mon, 28 Nov 2005 10:02:19 +0100, Sybren Stuvel wrote:
>>> Duncan Booth enlightened us with:
>>>> I would have thought that no matter how elaborate
a long time since I worried about this; there's
> probably a better version).
Sometimes you want relative differences, sometimes you care about absolute
differences, and sometimes -- very rarely -- you actually want full-blown
bit-for-bit equality.
--
Steven.
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 28 Nov 2005 12:40:07 -0600, Rocco Moretti wrote:
> Gaak! No! The Python license you point to contains horrible amounts of
> cruft due to the ownership ping-pong game. (And just using the hyperlink
> like you did leaves it vauge as to who is doing the liscensing - Steven
> D
Mike Meyer wrote:
> Steven Bethard <[EMAIL PROTECTED]> writes:
>
>>Dan Bishop wrote:
>>
>>>Mike Meyer wrote:
>>>
>>>
>>>>Is there any place in the language that still requires tuples instead
>>>>of sequences, except for
David Rasmussen wrote:
> Harald Armin Massa wrote:
>
>> Dr. Armin Rigo has some mathematical proof, that High Level Languages
>> like esp. Python are able to be faster than low level code like
>> Fortran, C or assembly.
>
> Faster than assembly? LOL... :)
I think the claim goes something along t
om
> distributing it, if you have a copy.
Only if the copy is licenced to you by the copyright owner under the GPL
in the first place. You can't just take source code you have no rights to,
or some other set of rights, stick the GPL on it without the copyright
owner's permission, and
hermy wrote:
> As I understand it, using super() is the preferred way to call
> the next method in method-resolution-order. When I have parameterless
> __init__ methods, this works as expected.
> However, how do you solve the following simple multiple inheritance
> situation in python ?
>
> class
I've got a list of word substrings (the "tokens") which I need to align
to a string of text (the "sentence"). The sentence is basically the
concatenation of the token list, with spaces sometimes inserted beetween
tokens. I need to determine the start and end offsets of each token in
the sente
Fredrik Lundh wrote:
> Steven Bethard wrote:
>> I feel like there should be a simpler solution (maybe with the re
>> module?) but I can't figure one out. Any suggestions?
>
> using the finditer pattern I just posted in another thread:
>
> tokens = ['She
Paul McGuire wrote:
> "Steven Bethard" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
>>I've got a list of word substrings (the "tokens") which I need to align
>>to a string of text (the "sentence"). The sentence i
Fredrik Lundh wrote:
> Steven Bethard wrote:
>
>
>>>>I feel like there should be a simpler solution (maybe with the re
>>>>module?) but I can't figure one out. Any suggestions?
>>>
>>>using the finditer pattern I just posted in another t
4101 - 4200 of 15563 matches
Mail list logo