op = 0;
> return Py_BuildValue("N",Rva);
> }
>
> Results in Python:
>
> , , 0x80d885c>, , , at 0x80d885c>, , ,
> , , 0x80d885c>,
>
PyList_SetItem steals a reference to "op" so DECREF'ing it reduces
the refcount to zero.
http://docs.python.org/api/listObjects.html
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
e.net/
import probstat
cards = range(52)
for (hand) in probstat.Combination(card, 5):
pass
Takes 1.3 seconds on my laptop instead of 17 seconds for the pure
python version which is only one order of magnitude faster.
Creating and populating 2598960 list objects one at a time isn't free
On Wed, Feb 08, 2006 at 12:50:19PM -0800, Swroteb wrote:
> Hi there,
>
> I've got a reasonably sized list of objects that I'd like to pull out
> all combinations of five elements from. Right now I have a way to do
> this that's quite slow, but manageable. I know there must be a better
> way to d
On Thu, Feb 09, 2006 at 10:23:12AM -0800, [EMAIL PROTECTED] wrote:
> Jack Diederich wrote:
> > On Wed, Feb 08, 2006 at 12:50:19PM -0800, Swroteb wrote:
> > > Hi there,
> > >
> > > I've got a reasonably sized list of objects that I'd like to pull ou
liberally snipped out parts
On Thu, Feb 09, 2006 at 03:25:18PM -0800, [EMAIL PROTECTED] wrote:
> Jack Diederich wrote:
> > > > On Wed, Feb 08, 2006 at 12:50:19PM -0800, Swroteb wrote:
> > > > >
> > > > > I've got a reasonably sized list
On Mon, Feb 13, 2006 at 08:52:06PM +, John Salerno wrote:
> Terry Hancock wrote:
>
> > So what's a 1-element tuple, anyway? A "mople"? "monople"?
> > It does seem like this lopsided pythonic creature (1,) ought
> > to have a name to reflect its ugly, newbie-unfriendly
> > nature.
> >
> > Are
On Tue, Feb 14, 2006 at 10:40:09AM -0500, Tim Peters wrote:
>
> the-acid-test-is-whether-you-say-"xor"-with-one-syllable-or-three-ly y'rs -
> tim
"Zorr!" of course.
Saying "All hail the mighty Exclusive Or!" would just sound silly.
-jackdied
--
http://mail.python.org/mailman/listinfo/python-
On Tue, Feb 14, 2006 at 05:32:48PM -0800, Jonathan Gardner wrote:
> Here at my job, Python gets no respect.
>
> A programmer here wanted to see which language among Python, Perl, and
> Java was better. So he wrote a Python, perl, and Java version. Except
> the Python version was 20x slower than th
On Wed, Feb 15, 2006 at 06:56:56PM -0800, Raymond Hettinger wrote:
> [Jack Diederich]
> > Is my math off or does 27ms mean 0.027 seconds? On my laptop (1.3GHz)
> > an empty python program takes 10ms to run (0.010 secs). I ask out of
> > vanity, my own solver takes .15 secon
On Wed, Mar 01, 2006 at 09:25:36PM +0100, Christoph Zwerschke wrote:
> Usually, you initialize class variables like that:
>
> class A:
> sum = 45
>
> But what is the proper way to initialize class variables if they are the
> result of some computation or processing as in the following silly
On Thu, May 05, 2005 at 01:35:09AM -0700, Max Derkachev wrote:
> Good day to all.
>
> Some time ago I'd been playing with a framework which uses dynamic
> class creation havily. Say, I could do:
>
> #well, try this with the new-style class
> class A(object):
> pass
>
> # the new-style __dic
On Wed, May 18, 2005 at 08:37:00AM -0700, john67 wrote:
> The company I work for is about to embark on developing a commercial
> application that will cost us tens-of-millions to develop. When all is
> said and done it will have thousands of business objects/classes, some
> of which will have hun
On Mon, May 23, 2005 at 10:51:47AM -0700, Discipulus wrote:
> Hey,
> I'm contemplating starting a MUD client in Python, and I would like to
> make it so that people can write their own plugins, but I need ideas on
> the framework. Any suggestions?
Use Lyntin? (http://lyntin.sourceforge.net/)
An ex
www.pythonware.com/daily/4368043588838810608/
Jack Crane
--
http://mail.python.org/mailman/listinfo/python-list
e.
I could be wrong on the byte-hack part as I've only recently learned
to read the chicken bones that are byte codes (thanks to PyCon sprints
I got to spend time picking python-devs's brains over burritos). It
seem plausible if fragile.
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
h of the records in serial you only have
the class overhead for one at any given time.
Hope that helps,
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
Hello there.
I’m a PHP fan but a Python newbie. I wrote anapplication in Python that
needs to read a cookie setup from a PHP page. Is itpossible to do it?
If not, what if I create a TXT file - as well as a cookie - thatcontains the
cookie’s data? Will python be able to open the file and
else_to_do_something() # waits forever
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
be maximally set-like. We're all adults here so
I'd call it a bug. bufferobect, rangeobject, and sliceobject all
do this too, but classmethod and staticmethod both check in tp_init.
Go figure.
As a work around use a function to make the set-alike.
class NamedSet(set): pass
def make_n
ists are ordered in the same way,
then you could walk through the lists in order using a merge procedure,
generating a new list as you go.
After ruling out slow data structures and algorithms, you'll almost
certainly be better off using something built in to Python rather than
c
o it is a safe bet.
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
d. It can never be
made magic enough.
> Given the persistent push of Ruby, I would strongly recommend that a
> workable integrated solution will be found for Reload & Go in Python,
> taking priority on many way out features of rather low practicality for
> many programmers.
Link? Goo
# chronic failure, reraise the last error
The job runs nightly at O'Dark thirty.
I get one chronic failure every few months.
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
now the internals.
If you are going to complain please at least post some context
about what you think should happen and some links to how other folks
have implemented it. Asserting python should do 'Reload and Go'
isn't very helpful.
-Jack
[1] I googled up a reference to it here
<http://www.unpossible.com/2006/04/20/time-saver-rails-console-reset/#comments>
--
http://mail.python.org/mailman/listinfo/python-list
Hello,
I got the following error:
Traceback (most recent call last):
File "vplayer.py", line 15, in ?
File "config.pyo", line 3, in ?
File "wx\__init__.pyo", line 44, in ?
File "wx\_core.pyo", line 3592, in ?
AttributeError: 'module' object has no attribute
'wxEVT_SCROLL_ENDSCROLL'
I ne
vice, but wouldn't that
make the program start for any user that logs on?
Thanks for sparing some time,
Jack Trades
PS. The source for the logger is below. I'll post the source for the
reader when I'm finished if anyone's interested (I'll also post it to
uselesspython when t
dangerous situations.) I'll be
modifying the program to watch for certain keywords which will enable the
logging, so as to give his kids some degree of 'privacy' as I think that is
important. Afterall how exciting would life be if you couldn't sneak a peek
at the occasional naked woman :)
Jack Trades
--
http://mail.python.org/mailman/listinfo/python-list
to
autostart the program for:
def autostartProgram(name, location):
os.system(r'reg add HKCU\software\microsoft\windows\currentversion\run /v
%s /t REG_SZ /d %s' % (name, location) )
Jack Trades
--
http://mail.python.org/mailman/listinfo/python-list
thon can run Python code in two modes, interpreted or compiled. In the
latter case, the Lisp code is translated into assembly. The advantage of
interpreted code is that debugging is easier (the stack trace contains more
information); on the other hand execution of compiled code is much faster.
Jack Trades
--
http://mail.python.org/mailman/listinfo/python-list
"Wolfgang Draxinger" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> jack trades wrote:
>
> > Honestly I never even thought of that, it just sounded like a
> > fun, and easy,
> > project to put my mediocre programming skills to some use.
http://jackdied.blogspot.com/2008/03/misc-from-pycon-ii.html
Enjoy,
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
Hello all, I am trying to run the Universal information crawler wed
spider on my mac. It seems to install without any trouble but when, in
unix command line, I try to run "paster create --list-templates" it
returns this Value Code error. I followed instructions provided at
http://lucasmanual.com/m
Isn't string.Template suppose to be faster than calling replace multiple
times? That's what I thought until I benchmarked this code, where
string.Template ended up being 4 times slower.
This doesn't make sense to me, since unlike when you are calling replace
multiple times, code behind Template ca
ime.time()
conn = telnetlib.Telnet('localhost', 80)
print time.time() - start
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
reproduce the behavior in a testable snippet please submit
a bug and assign it to me on bugs.python.org (jackdied on the bug
tracker).
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
I'm wondering if there's an easy way to do a 'svn commit' on a
directory from Python.
More Details:
I have a wiki-like program that stores its data in a directory that I
would like to put under version control to be able to roll back
unwanted changes. The program is stored in two directories, a '
On May 19, 12:26 am, Lawrence D'Oliveiro wrote:
> In message <2904e7de-0a8d-4697-9c44-
>
> c83bb5319...@s31g2000vbp.googlegroups.com>, Jack Trades wrote:
> > Originally I had the 'data' directory in the same directory as the cgi
> > scripts and was usi
On May 19, 3:46 am, Duncan Booth wrote:
> Jack Trades wrote:
> > Originally I had the 'data' directory in the same directory as the cgi
> > scripts and was using os.system("svn commit"), however I kept running
> > into weird bugs with this method. So
On May 19, 3:53 am, Lawrence D'Oliveiro wrote:
> In message
> d9e205be7...@s31g2000vbp.googlegroups.com>, Jack Trades wrote:
> > On May 19, 12:26 am, Lawrence D'Oliveiro > central.gen.new_zealand> wrote:
>
> >> In message
On Sat, 24 May 2008 14:09:07 +0200,Mathieu Prevot wrote:
> Hi
>
> I import subprocess and use Popen, but PIPE is not defined. I used
> 2.5.1, 2.5.2, Python 2.6a3+ (trunk:63576, May 24 2008, 12:13:40), it's
> always the same. What am I missing ?
>
> Thanks
> Mathieu
Try subprocess.PIPE.
--
http:
.3.5-8ubuntu2)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> import thread
>>> sys.modules['thread']
>>> thread
>>> ^D
sprat:~# cd ~/src/python-head/Modules/
sprat:~/src/python-head/Modules# ls thread*
threadmodule.c threadmodule.o
It is a built-in module so it doesn't have a .so (dll) or .py file
to mention.
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
hensions are new in 2.4. Try:
>
>self._all_states |= set([key[i] for key in probabilities])
And sets aren't a builtin in 2.3
try:
set()
except NameError:
import sets
set = sets.Set
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
and store it in
the tiles (assuming the tiles don't move around).
As a last resort you can write the sensitive bits in C and add a python
wrapper. For the ICFP contest[1] each year I write the few primitives
in C and all the logic in python and it works quite well.
-Jack
[1] http://icfpcontest.org/
--
http://mail.python.org/mailman/listinfo/python-list
Xah, is that you?
--
http://mail.python.org/mailman/listinfo/python-list
or is there some more explicit set support somewhere
> I'm not seeing?
There are people that use sets from C-code but I don't know if they use
the slotted methods, the 2.5 version, or a special build.
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
If you want to support 2.3 just use the yield version. Having
two versions of the same thing is asking for trouble. Twice
the tests, twice the room for breakage, twice the places to
update if you want to change it.
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
ggling young AI trying to extrapolate the average content of an
alt.group to the comp.lang community. The fact that it passed the
gmail spam filters is a sign of progress.
So hello new friend, and your backgroung is the best rockets!
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
n 2009 http://pycon.blip.tv/file/1949345 by a very handsome
and well beloved man, and come to pycon 2010 where there will be a
couple more talks on the subject by slightly more homely but none the
less competent speakers.
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
n I did in my classes proper (probably
because I spent hundreds of hours in class but thousands of hours
writing LPC).
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
It's Xah Lee, he's been trolling this and every other programing
language group for over 10 years (preferably all at once). Let it go.
On Sat, Oct 3, 2009 at 2:53 AM, Chris Withers wrote:
> Xah Lee wrote:
>>
>> Haskell has a new logo. A fantastic one. Beautiful. For creator,
>> context, detail,
same thing?
How about using yield and then iterate over the answer:
def some_fun():
\tfor result in some_loopable_stuff:
\t\t yield result
Then call it thusly:
for i in some_fun()
result = i
-Jack (PS, sorry to the OP, you will get two of these -- I forgot to CC
the list
x[1]
output: 'A'
That should be enough to get you started in the right direction.
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
o do the same thing.
I think this is a perfect example of `while True:` that works damn well,
and there isn't anything that can replace its simplicity. Programming
practices be damned, it is invaluable, and I would recommend doing it in
my situation to any person, regardless of programming experience.
Food for thought.
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
ust ignore them please, and if someone
*kindly* asks you to keep it on topic, then *please* do so.
-jack
--
http://mail.python.org/mailman/listinfo/python-list
I'd like to add that there are several lisp apps out there that give you
a REPL (for example stumpwm). A REPL could be seen as a sophisticated
`eval' loop.
Case in point, it is common in the lisp world. You could, in theory,
hose your system from inside emacs (and you may not even
nds to brute force a solution then you probably have more
problems than just matching checks to invoices...
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
ing story with no whiz-bang feature behind it, but I like that the
language behaves that way for exactly that reason.
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
9 seems to work for me.
kill -1 -1
Back in the days of thin X terminals I used that one as a quicker
alternative to actually logging out. It is also useful if you start a
fork bunny and need to hit the panic switch before the machine grinds
to a halt.
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Mar 3, 2010 at 12:36 PM, Xah Lee wrote:
[snip]
Xah Lee is a longstanding usenet troll. Don't feed the trolls.
--
http://mail.python.org/mailman/listinfo/python-list
languages don't necessarily suffer from Java's design flaws.
The original "Gang of Four" book was about C++ and not Java. The fact
that you can casually assert that "Design Patterns" are about Java
says something not entirely kosher about Java ;)
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
se
>
> Why do you need to check for True/False?
>
You should never check for "is" False/True but always check for
equality. The reason is that many types support the equality (__eq__)
and boolen (__bool__ in 3x) protocols. If you check equality these
will be invoked, if you check identity ("is") they won't.
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, Mar 5, 2010 at 6:09 PM, Steven D'Aprano
wrote:
> On Fri, 05 Mar 2010 15:58:01 -0500, Jack Diederich wrote:
>
>>>> So, the pythonic way to check for True/False should be:
>>>>
>>>>>>> 1 is True
>>>> False
>>>
&
l__(self, *args, **kw):
return call_func(self, *args, *kw)
return NewClass
or the return could even be NewClass() [return an instance] if this is
a one off.
That said, I'm not really sure what this behavior is good for.
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
new object but the subclass Value is
compatible (as I would except since it is a sublcass) then just change
all references in Franction.__add__ to be more generic, ex/
class Franction():
def __add__(self, other):
return self.__classs__(self.denominator + other.denominator)
That way if __
On Sat, Mar 13, 2010 at 12:10 PM, Jon Clements wrote:
> On 13 Mar, 16:42, Jack Diederich wrote:
>> On Sat, Mar 13, 2010 at 11:19 AM, Jon Clements wrote:
>> > This is semi-experimental and I'd appreciate opinions of whether it's
>> > the correct design appro
element (get/find)
and then put them in your class like this
class Market():
code = ElemGetProperty('code')
title = ElemFindProeprty('title')
The getattr/setattr method is easier to understand and will handle
arbitrary elements; for the descriptors version you'll have to define
one for each tag that might be used on the class.
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
es are a valid use case (I do it all the time).
Python 3 has a small cleanup that makes classes even closer to module
namespaces; namely the concept of "unbound methods" goes away. In
3.x when you get a function from a class you get the function itself
and not an unbound function.
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
Apologies if this is a bit off the wall but I've only just started getting
into unit testing (in Python) this morning. Would generators help you in any
way? You might be able to have a generator which would yield an attribute
set combination each time it is called.
I'm not sure if it would still st
s through a set of C DLLs
using Ctypes.
Any help or suggestions will be greatly appreciated,
Thanks very much,
Jack
--
http://mail.python.org/mailman/listinfo/python-list
ile I read from there.
It's probably some sort of ring buffer implementation so I'd have to read
the frames out and store them to disk before the next run through the buffer
overwrites the old frames.
How does that sound, process/thread wise?
Thanks,
Jack
--
The earth is a very small stage in
s will not work as expected. Therefore I'd like to mock out the
ctypes dll calls. Can you give me an indication of how you would go about
doing this with Simplistix? Just so you know, I use py.test for unit
testing.
Thanks,
Jack
On Fri, Jan 14, 2011 at 12:38 PM, Chris Withers wrote:
> Hi
Appologies, please read the 2nd last line as:
Can you give me an indication of how you would go about doing this with
TestFixtures? :)
Thanks
Jack
On Fri, Jan 14, 2011 at 2:39 PM, Jack Keegan wrote:
> I'm new to python and have just been looking into a solution for Mocking
>
Hi Chris,
Thanks for that. I'll give it a go.
Cheers,
Jack
On Fri, Jan 14, 2011 at 2:49 PM, Chris Withers wrote:
> Hi Jack,
>
>
> On 14/01/2011 14:39, Jack Keegan wrote:
>
>> objects. In particular, at the moment, testing some code that needs to
>> access ha
Am struggling to understand Python method-to-instance binding
Anyone know why this example throws a TypeError?
> #!/usr/bin/env python
>
> import functools
>
> # Take a generator function (i.e. a callable which returns a generator) and
> # return a callable which calls .send()
> class coroutine
e wrote so I thought "Hey, I'll just ask
Tim!" I asked him and he replied "I'm not sure what you're asking -
do you want me to read the code aloud to you?" So I just went and
read it.
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
administrator says that it is impractical to install matplotlib on all of
them, because it requires X window, which takes up a lot of memory, which
the computing nodes do not have. Thanks for any help in advance.
Cheers,
Jack
--
http://mail.python.org/mailman/listinfo/python-list
rt() in a loop. Also, lists can have mutable members so
there are times you really /do/ want to compare lists instead of
hashes.
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
ormat, and if other people do the same for theirs we may be able to get to
common ground...
--
Jack Jansen, , http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma Goldman
--
http://mail.python.org/mailman/listinfo/python-list
> Is this a valid construction ( sorry I'm not a programmer),
> or are there better ways to accomplish similar dynamic behavior ?
>
You can have two classes and then just change the class of the
instances that need it.
class A(object):
def method1(self): pass
class B(A):
one that ever used "fishes".
"loaves and fishes" would be familiar (but still archaic) to anyone
who has read the King James Version of the bible.
http://bible.cc/luke/9-16.htm
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
no code, don't even bother to
use something that looks like a real name, and continually demand that
volunteers (which we all are) write code to fulfill your speculative
needs.
If-it-walks-like-a-troll-and-smells-like-a-troll-it's-a-troll-ly,
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
really directly saying anything about it.
You want to import a name that is itself a namespace; preferably a
module or package and sometimes a class. Importing constants can lead
to trouble. ex/
from settings import DEBUG
if DEBUG: log('debug is on!')
The value of the flag gets fetched at import time. If code in another
module updates settings.DEBUG later your module won't see it. ditto
for exceptions.
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
, or what makes sense in English, but
rather "what was the obvious way to write an LL(1) syntax if you are a
Dutchman who speaks English?"
Hope-that-clears-things-up-ly,
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
ing a defaultdict(list) as the main structure; it
worked but was uglier by far { curr_val => [it1, it2, ..]} with dels
and appends.
-Jack
ps, woops, I forgot to hit reply all the first time.
--
http://mail.python.org/mailman/listinfo/python-list
u want
to do and in clear prose. The stdlib isn't meant to have a one liner
for everything.
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, Jun 11, 2009 at 2:54 PM, Terry Reedy wrote:
> Jack Diederich wrote:
>>
>> On Thu, Jun 11, 2009 at 12:03 AM, David M. Wilson wrote:
>> [snip]
>>>
>>> I found my answer: Python 2.6 introduces heap.merge(), which is
>>> designed exactly for th
so the "1,2,3" tuple is always interpreted
as a tuple and the square brackets always expect an int or a slice.
Not including special cases everywhere means there isn't a short way
to handle special cases but it also means human readers have to
remember fewer special cases. Perl and Python make different
tradeoffs in that respect.
-Jack
[1] http://www.perlmonks.org/?node_id=111952
--
http://mail.python.org/mailman/listinfo/python-list
(or release, or whatever) method. I'd recommend making an
> effort to call it and to rely on __del__ as little as possible.
This. If you care enough about a resource to write a __del__ method
you care enough to clean it up explicitly. 'with' blocks are very
nice for that.
-jack
--
http://mail.python.org/mailman/listinfo/python-list
that uses a custom
dictionary. This was added to make some common cases easier (like
knowing in which order members were defined). This is not
backportable to 2.6 because the __metaclass__ is defined inside the
class body and possibly anywhere in the class body.
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
n the face of ambiguity, refuse the temptation to guess.
It isn't an OrderedDict thing, it is a comparison thing. Two regular
dicts also raise an error if you try to LT them. What does it mean
for a dict to be greater than or less than its peer? Nothing, so we
refuse to guess.
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
t):
while len(primes) < n:
primes.append(next_prime())
return primes[n]
-Jack
[1]
http://www.catonmat.net/blog/solving-google-treasure-hunt-prime-number-problem-four/#comment-3075
There is a deque implementation that is faster still but I can't
find a link.
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Jul 20, 2009 at 10:00 AM, Steven
D'Aprano wrote:
> On Mon, 20 Jul 2009 09:34:24 +, Sion Arrowsmith wrote:
>
>> Terry Reedy wrote:
>>>Sion Arrowsmith wrote:
>>>> Jack Diederich wrote:
>>>>> It isn't an OrderedDict thing, it
s on how mutable you want your strings. There have been
several patches proposed on python-dev over the years that do things
like lazy concatenation and ropes. They were always shot down because
the implementation or the semantics were very complicated.
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
e still in this interactive shell session I could do
something like:
In [1]: what_is_in(func)
"The def for func(input) is:"
print "im in this function!" + str(input)
print "doing some stuff"
sleep(10)
and therefore be able to recount what I just did.
Cheers,
Jack
--
http://mail.python.org/mailman/listinfo/python-list
it all, instead of forcing
an index, not to mention trying to find the most specific regexp that
works(least generic -- I don't want any false positives). I also do
_not_ like having spaces in the regexp itself. If I need more than one
space I'll use '\s*' or '\s+'.
Al
ns it. There are no new allocations at all.
Be very careful recommending optimizations based on how you think the
underlying implementation works without double checking with the code
first.
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Sep 22, 2009 at 7:25 PM, Nobody wrote:
> On Mon, 21 Sep 2009 16:33:08 -0400, Jack Diederich wrote:
>
>>> AIUI, as a python string is imutable, a slice of a string is a
>>> new string which points (C char *) to the start of the slice data
>>> and with a
tion of the switch using
dictionaries but someone had commented that creating and throwing away
dictionaries also comes at a cost.
I was wondering if any of you could advise or point me in the right
direction.
Any help would be greatly appreciated.
Thanks,
Jack
--
http://mail.python.org/mailman/listinfo/python-list
interest to
me every day on python-list. You get used to it. [For the record
ConFoo /does/ interest me, but I can't take a week and a half off to
do that plus PyCon].
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
rg/community/jobs/ is the appropriate place for this.
2) Comic sans? Wow.
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
301 - 400 of 408 matches
Mail list logo