Miles <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> On 7/20/07, Alex Popescu <[EMAIL PROTECTED]> wrote:
>> If you just want to iterate over your dict in an ordered manner than
>> all you have to do is:
>>
>> for k in my_dict.keys().sort():
>> # rest of the code
>
> I think you meant s
On Fri, 20 Jul 2007 19:08:57 +, Alex Popescu wrote:
> I am wondering what is the most pythonic way of dealing with missing
> keys and default values.
[snip three versions]
Others have already mentioned the collections.defaultdict type, however it
seems people have forgotten about the setdef
On Fri, 20 Jul 2007 15:27:51 -0700, montyphyton wrote:
b = a.keys()
b.sort()
> [1, 2, 3]
>
> Works fine, but I would really like it if I could somehow do it in one
> line.
Why? Is the Enter key on your keyboard broken? Is there a global shortage
of newline characters that I haven't be
Hi Group,
troubles with converting signed 32.32, little-endian, 2's complement
back to floating point. I have been trying to brew it myself. I am
running Python 2.5 on a Mac. Here is the C-code I have been trying to
leverage:
double FPuint8ArrayToFPDouble(uint8 *buffer, int startIndex)
{
uin
> On Behalf Of Paul Rubin
> I'm wondering how other projects go about this.
I develop an automated build system from the very beginning. Running the
build script:
* Creates the API documentation (epydoc)
* Creates the help files (extracting some information from the source)
* Builds a windows exec
Watch Free Satellite TV on your PC or Laptop
Instantly Turn your Computer into a Super TV
• Watch all your favorite shows on your Computer & TV!
• Channels you can’t get any other place in the U.S.A!
• Watch from anywhere in the world!
• Save 1000's of $$$ over many years on cable and satellite
It appears to be correct for positive numbers.
if conval >= 2**16:
conval -= 2**32
would appear to patch things up.
It's not very pretty, though. You could at least start with
input1 = [c_ushort(item) for item in input]
instead of your first 9 lines.
mt
--
http://mail.python.org/mailman/
Anyone on this group writing Python code in Nashville, TN?
--
http://mail.python.org/mailman/listinfo/python-list
Can someone who knows about python internals throw some light on why
>>> x in dic
is cheaper than
>>> dic.has_key(x)
??
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 21 Jul 2007 09:22:32 +0530, Rustom Mody wrote
> Can someone who knows about python internals throw some light on why
> >>> x in dic
> is cheaper than
> >>> dic.has_key(x)
>
> ??
I won't claim to know Python internals, but compiling and disassembling the
expressions in question reveals the
pycraze wrote:
> Hi ,
>
> I am working on NTLM (Windows NT Lan Manager )APS
> (Authentication Proxy Server ) , to port to C language .
the 'wget' utility supports NTLM authentication as of version 1.1.0 or so, you
might try just looking at the C source code to wget if you're looking to
imp
Hey guys!
For the last couple of days, I've been fighting a war against
generators and they've beaten the crap out of me several times. What I
want to do is implement one that yields every possible permutation of
a given sequence (I had lists in mind, but I could swear that this
would work on strin
Just a quick P.S: This WOULD NOT work with strings, because of
seq.insert()
In very other aspect, I'm still lost.
--
http://mail.python.org/mailman/listinfo/python-list
So,
Can mailing lists have its mail filtered? I get more spam via mailing
lists than I do in my own inbox. I am not just singling this mailing
list. I see it a lot now.
Danyelle
--
http://mail.python.org/mailman/listinfo/python-list
On Jul 21, 12:42 am, Pablo Torres <[EMAIL PROTECTED]> wrote:
> Hey guys!
> For the last couple of days, I've been fighting a war against
> generators and they've beaten the crap out of me several times. What I
> want to do is implement one that yields every possible permutation of
> a given sequenc
Pablo Torres <[EMAIL PROTECTED]> writes:
> def perm(seq):
> "Reshuffles the elements of seq in every possible way"
> if len(seq) == 1:
> yield seq
> else:
> for p in perm(seq[1:]):
> for i in range(len(seq)):
>
>
> list.insert returns None. Thus, except in the one-element case, your
> generator is yielding None all the time.
>
Oh god...silly me.
Thank you guys for the help :)
P.S I'm dead stubborn, so here's what I did to fix my code:
def perm(seq):
"Reshuffles the elements of seq in every pos
"Steve Holden" <[EMAIL PROTECTED]> wrote:
> Hmm, I suspect I detect the sounds of the square wheel being reinvented.
Very helpful, thank you, Steve - Now how about pointing out in which
direction the round wheels are kept, and what their monikers are?
- Hendrik
--
http://mail.python.org/mailma
"Diez B. Roggisch" <[EMAIL PROTECTED]> writes:
> > Come on, this is real-time embedded software,
> Since when did we restrict ourselves to such an environment? I was under the
> impression that this thread is about the merits and capabilities of static
> type-checking?
One branch of the discussion
En Fri, 20 Jul 2007 12:48:05 -0300, Prepscius, Colin (IT)
<[EMAIL PROTECTED]> escribió:
> Does anybody know how to pass parameters to 'exec
> somefunction.func_code'?
> def f1():
> print 'this is f1'
> def f2(p):
> print 'this is f2, p =', str(p)
> exec f1.func_code
> THIS RESULTS IN: "
101 - 120 of 120 matches
Mail list logo