On 5/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Graham> Looking up a key in a dictionary is done in constant-time,
> Graham> i.e. it doesn't matter how large the dictionary is.
>
> Doesn't that depend on how many keys hash to the same value? For small
> dictionaries keeping th
Casey Hawthorne wrote:
> For Large Dictionaries Could One Use Separate Dictionaries Where Each
> Dictionary Covers an Interval of the Input Range?
One Could, But Why? :-) You wouldn't see any performance improvements.
Looking up a key in a dictionary is done in constant-time, i.e. it
doesn't matte
Sion Arrowsmith wrote:
> Unfortunately:
> >>> print 'a'+'bc' |ips| 'abc'
> True
>
> Which might not be what you want. On the other hand, it's a simple
> fix:
> >>> ips = Infix(lambda a, b: (a != b) and (a in b))
> >>> print 'a'+'bc' |ips| 'abc'
Ah, good point.
Graham
--
http://mail.python.org/m
WENDUM Denis 47.76.11 (agent) wrote:
> While testing recursive algoritms dealing with generic lists I stumbled
> on infinite loops which were triggered by the fact that (at least for my
> version of Pyton) characters contain themselves.
[snip]
> Leading to paradoxes and loops objects which contain
Tommy R wrote:
> I need some way to execute a string and pass arguments to the functions
> inside the string. We have discussed a solution where we first load the
> string (containing some funcs) and then run something similar to
> Py_RunString("foo(1.0, 'str')"); We need to do this in a generic w
puff wrote:
> I'm able to catch IE's events including DocumentComplete with:
>
> def OnDocumentComplete(self, pDisp, URL):
>
> so i have pDisp. Self is the object returned by:
>
> self.ie = DispatchWithEvents("InternetExplorer.Application",
> InternetExplorerEvents)
>
> that created th
Peter Hansen wrote:
> Graham Fawcett wrote:
> > Steve Holden wrote:
> >>>Nicola Musatti wrote:
> >>>Of course, I'm going on vacation next week and there was talk
> >>>about a one-way ticket to Mexico. The real question is will they let me
>
Steve Holden wrote:
> > Nicola Musatti wrote:
> > Of course, I'm going on vacation next week and there was talk
> > about a one-way ticket to Mexico. The real question is will they let me
> > *back* in? :-)
> >
> I would be careful coming back across the border. I heard that the PSU
[suspicous pre
Cameron Laird wrote:
> In article <[EMAIL PROTECTED]>,
> <[EMAIL PROTECTED]> wrote:
> .
> >Well, this may be the CPython way of open source but I don't know if
> >that is "Open source" in general. Another way is that if someone(or
> >group) don't like the current state of a p
Fuzzyman wrote:
> Hello all,
>
> I'm writing a module that takes user input as strings and (effectively)
> translates them to function calls with arguments and keyword
> arguments.to pass a list I use a sort of 'list constructor' - so the
> syntax looks a bit like :
>
>checkname(arg1, "arg 2",
Dieter Vanderelst wrote:
> Hello,
>
> I'm having a problem with playing WAV files using Winsound.
>
> If I use winsound to play a certain WAV files only the first few seconds
> of the file get played. I think this comes because these files contain
> some parts of silence. There winsound seems the s
[EMAIL PROTECTED] wrote:
> I'm using GNU Emacs 21.3.1 with python-mode 1.0alpha under Windows XP.
> Whenever I execute a command in an edit window (with
> py-execute-region), the output window steals the focus. How can I stop
> this happening?
[snip]
> I commented out the command
> (pop-to-buffer
Matthew Thorley wrote:
> Greetings, I have a question I hope some one with more back ground can
> give me a little help with.
>
> I want to write a simple internet monitoring script for windows that
> watches out bound http traffic and keeps a list of all the site visited.
>
> I am thinking that I
Marco Aschwanden wrote:
> The second line of your code is already a show stopper in my case:
>
> from win32com.client import Dispatch
> session = Dispatch('Lotus.NotesSession')
> session.Initialize('my_secret_passwort')
>
> When started, ends:
> [snip]
> AttributeError: Lotus.NotesSession.Initiali
Ben Finney wrote:
> Howdy all,
>
> I'd like to have an Abstract Data Type for a scalar value that is
> restricted to a small set of values. Like an Enum, I suppose.
>
> What I would like is to be able to use simple 'str' values in most of
> the code, but where the values are actually used in a sema
Grzegorz Slusarek wrote:
> Hello everyone. I have to get data from Lotus Notes and i curious is it
> possible doing it with Python. I heard that Lotus Notes using COM, so
> the Python does so maybe it can be done? Anyone have any experiences
> doing that?
> Ane help will by apreciated
Yes, it's p
Xah Lee wrote:
> Dear Peter Hansen,
> My messages speak themselfs. You and your cohorts's stamping of it does
> not change its nature. And if this is done with repetitiousness, it
> gives away your nature.
Taunt not the cohorts of Peter Hansen!
Graham
--
http://mail.python.org/mailman/listinfo/
Jim wrote:
> Hi,
>
> I'm using reStructuredText as a format for some group documentation,
> and often my co-workers take notes during meetings in Word's outline
> mode. Does anyone already have a python script that will convert from
> Word (or the Open Office file format version of a word document
[EMAIL PROTECTED] wrote:
> >So you're using Putty to telenet/ssh into the FreeBSD server, but what
> >editor on you using on the FreeBSD server?
>
> I use pico for that.
> That Samba isn't available but I can install it.
>
> Or are there other editors for FreeBSD that I can run with putty ?
I use
Kreedz wrote:
> Could Windows version have anything to do with this?? Else I've got
> some really weird issue...
>
> I'm on Windows 2000 Professional
Yes, that definitely counts as a wierd issue.
I couldn't reproduce the bug either.
C:\temp>python
ActivePython 2.4.1 Build 247 (ActiveState Corp
Sebastian Bassi wrote:
> On 20 Jul 2005 10:47:50 -0700, Graham Fawcett <[EMAIL PROTECTED]> wrote:
> > This looks a lot like 2D data (row/column), not 3D. What's the third
> > axis? It looks, too, that you're not really interested in storage, but
> > in analy
Sebastian Bassi wrote:
> Hello,
>
> I have to parse a text file (was excel, but I translated to CSV) like
> the one below, and I am not sure how to store it (to manipulate it
> later).
>
> Here is an extract of the data:
>
[snip]
This looks a lot like 2D data (row/column), not 3D. What's the third
In translating natural language to SQL, be sure you're not introducing
opportunities for SQL injection attacks. Code like
sql = 'SELECT %s FROM %s' % (this, that)
is considered dangerous, because a well-crafted value for "that" can be
used to, e.g., delete rows from your tables, run system com
Steven D'Aprano wrote:
> Speaking as an Australia, ...
> [snip]
> But don't worry, there is one thing we all agree on throughout the
> English-speaking world: you Americans don't speak English.
And lest you feel Steven's observation don't bear much weight, keep in
mind that he is speaking as an en
chris patton wrote:
> Hi everyone.
>
> Has anyone seen that problem with running a python cgi script in a
> server?
> It takes you to myspace.com/redmartian or something. Anyway, does
> anyone know when this problem will be fixed?
It could be solved much sooner if you follow these steps:
(1) Care
Peter Hansen wrote:
> francisl wrote:
> > How can we get a full directory size (sum of all his data)?
> > like when we type `du -sh mydir`
> >
> > Because os.path.getsize('mydir') only give the size of the
directory
> > physical representation on the disk.
>
> os.popen('du -sh mydir') would be one
Luis M. Gonzalez wrote:
> Hey Dimitri,
>
> I completely agree with you in that Python needs once for all a cool
> logo.
> I like your design very much, but I have a few thoughts about it:
>
> 1) I think that Python's logo should reflect its power.
> If we use a mascot as its image, we would be givi
27 matches
Mail list logo