On Oct 9, 5:50 am, Matthias Blume <[EMAIL PROTECTED]> wrote:
> "." <[EMAIL PROTECTED]> writes:
> > On Tue, 09 Oct 2007 05:15:49 +, gnuist006 wrote:
>
> >> Again I am depressed to encounter a fundamentally new concept that I
> >> was all along unheard of. Its not even in paul graham's book where
On Tue, 09 Oct 2007 18:08:34 +, Steven D'Aprano wrote:
L = []
id(L)
> 3083496716L
L += [1]
id(L)
> 3083496716L
>
> It's the same L, not rebound at all.
It *is* rebound. To the same object, but it *is* assigned to `L` and not
just mutated in place.
In [107]: class A:
Marc Christiansen pisze:
>
> I had a (not so quick) look. The code proves its point (i.e. writing a
> very small p2p application is possible), but it is horrible. With only
> one server, the code is broken; maybe it works using multiple servers, I
> didn't test. A quick fix seems to be to change
Steven D'Aprano schrieb:
> On Tue, 09 Oct 2007 19:23:37 +0200, Diez B. Roggisch wrote:
>
>> Your believes aside, this is simply wrong. The statement
>>
>> a += x
>>
>> always leads to a rebinding of a to the result of the operation +.
>
> Not true.
Yes, it is.
L = []
id(L)
> 30834967
On Oct 9, 3:35 pm, Istvan Albert <[EMAIL PROTECTED]> wrote:
>
> why would it be late? is the future of you own work not worth the time
> it takes to rename it? Compared to all the other work it took ... it
> is just a mere inconvenience.
>From a sourceforge perspective I think it's more than in
in
On Tue, 09 Oct 2007 19:20:06 +, gnuist006 wrote:
> On Oct 8, 11:09 pm, "." <[EMAIL PROTECTED]> wrote:
>> On Tue, 09 Oct 2007 05:15:49 +, gnuist006 wrote:
>
>>
>> > Can anyone explain:
>>
>> > (1) its origin
>>
>> One of the lambda papers, I think. I don't remember which.
>
> Hey no-name
I'm getting the following exception when I call an external extension
(pytst):
/usr/lib/python2.5/threading.py:697: RuntimeWarning: tp_compare didn't return
-1 or -2 for
exception
return _active[_get_ident()]
Traceback (most recent call last):
File "testDataMiner2.py", line 77, in
On 10/9/07, Bruno Barberi Gnecco
<[EMAIL PROTECTED]> wrote:
> I'm getting the following exception when I call an external extension
> (pytst):
>
> /usr/lib/python2.5/threading.py:697: RuntimeWarning: tp_compare didn't return
> -1 or -2 for
> exception
>return _active[_get_ident()]
> Tr
On 10/9/07, Andreas Kraemer <[EMAIL PROTECTED]> wrote:
>
> I sometimes find it useful to store meta data on dictionary keys, like in
> the following example:
>
> class Dict(dict):
> def __init__(self,*args,**kw):
> self.key_dict = {}
> super(Dict,self).__init__(*args,**kw)
> def __setit
On Oct 9, 2007, at 3:32 PM, . wrote:
> On Tue, 09 Oct 2007 19:20:06 +, gnuist006 wrote:
>
>> On Oct 8, 11:09 pm, "." <[EMAIL PROTECTED]> wrote:
>>> On Tue, 09 Oct 2007 05:15:49 +, gnuist006 wrote:
>>
>>>
Can anyone explain:
>>>
(1) its origin
>>>
>>> One of the lambda papers, I t
HTMLParser is behaving in, what I find to be, strange ways and I would
like to better understand what it is doing and why.
First, it doesn't appear to translate HTML escape characters. I don't
know the actual terminology but things like & don't get translated into
& as one would like.
On 10/10/2007 12:56 AM, Stefan Arentz wrote:
> Is it possible to mix classes defined in both Python and C in the same
> module? Ideally I would like to be able to do:
>
> from some.module import MyPythonClass, MyCClass
>
> I guess that would mean that this would look like this on disk:
>
> som
[EMAIL PROTECTED] wrote in article <[EMAIL PROTECTED]> in comp.lang.functional:
> > One of the most lucid explanations of definitional interpreters --
> > including those that are based on continuation-passing -- are
> > explained in J. Reynolds' famous 1971 "Definitional Interpreters for
> > Highe
>> who says that timezones have to be separated by one hour each?
>
> The Earth says. It takes 24 hours to revolve.
Wrong
>> Why aren't they separated by 30minutes, or 20, or 10? Or 2 hours?
>
> Why isn't an hour defined to be 30 minutes?
>
>> Or why don't we have a global time?
>
> Like UTC?
>> who says that timezones have to be separated by one hour each?
>
> The Earth says. It takes 24 hours to revolve.
Your kidding me, aren't you? Beside the fact that the earth does not
revolve in 24h (leap seconds, if you like to google), even the 24 hours
of a day are as arbitrary as you prefe
Just Another Victim of the Ambient Morality schrieb:
> HTMLParser is behaving in, what I find to be, strange ways and I would
> like to better understand what it is doing and why.
>
> First, it doesn't appear to translate HTML escape characters. I don't
> know the actual terminology but
On 10/10/2007 12:30 AM, Tommy Grav wrote:
> Hi everyone,
>
> I have a list of objects where I have want to do two loops.
> I want to loop over the list and inside this loop, work on all
> the elements of the list after the one being handled in the outer
> loop. I can of course do this with index
On 10/10/2007 1:33 AM, Hamilton, William wrote:
>> From: Tommy Grav
>>
>> Hi everyone,
>>
>>I have a list of objects where I have want to do two loops.
>> I want to loop over the list and inside this loop, work on all
>> the elements of the list after the one being handled in the outer
The man
On 10/10/2007 1:00 AM, Chris Mellon wrote:
> On 10/9/07, Tommy Grav <[EMAIL PROTECTED]> wrote:
>> Hi everyone,
>>
>>I have a list of objects where I have want to do two loops.
>> I want to loop over the list and inside this loop, work on all
>> the elements of the list after the one being handl
"Diez B. Roggisch" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Just Another Victim of the Ambient Morality schrieb:
>> HTMLParser is behaving in, what I find to be, strange ways and I
>> would like to better understand what it is doing and why.
>>
>> First, it doesn't a
It's cool when you solve your own problems. It was as simple as this:
def dictToKeyValue(self, mydict):
soap_list = []
for key,value in mydict.items():
inner = {"key":key,"value":value}
soap_list.append(inner)
return soap_list
It's just a list of di
On Tue, 09 Oct 2007 19:46:35 +, Marc 'BlackJack' Rintsch wrote:
> On Tue, 09 Oct 2007 18:08:34 +, Steven D'Aprano wrote:
>
> L = []
> id(L)
>> 3083496716L
> L += [1]
> id(L)
>> 3083496716L
>>
>> It's the same L, not rebound at all.
>
> It *is* rebound. To the same objec
On Tue, 09 Oct 2007 22:27:47 +0200, Diez B. Roggisch wrote:
> Steven D'Aprano schrieb:
>> On Tue, 09 Oct 2007 19:23:37 +0200, Diez B. Roggisch wrote:
>>
>>> Your believes aside, this is simply wrong. The statement
>>>
>>> a += x
>>>
>>> always leads to a rebinding of a to the result of the operat
On Tue, 09 Oct 2007 21:25:38 +0200, Laszlo Nagy wrote:
> a = 1
> a+= 1 # The compiler will probably optimize this and the Python bytecode
> interpreter will not rebind 'a' here, just increment the integer in
> memory.
No. This is Python, not C. You can't increment integers in memory.
Integers ar
On 10/9/07, John Machin <[EMAIL PROTECTED]> wrote:
> On 10/10/2007 1:33 AM, Hamilton, William wrote:
> >> From: Tommy Grav
> >>
> >> Hi everyone,
> >>
> >>I have a list of objects where I have want to do two loops.
> >> I want to loop over the list and inside this loop, work on all
> >> the ele
On Tue, 09 Oct 2007 22:43:16 +, Steven D'Aprano wrote:
> On Tue, 09 Oct 2007 19:46:35 +, Marc 'BlackJack' Rintsch wrote:
>
>> On Tue, 09 Oct 2007 18:08:34 +, Steven D'Aprano wrote:
>>
>> L = []
>> id(L)
>>> 3083496716L
>> L += [1]
>> id(L)
>>> 3083496716L
>>>
>>> It'
From: Chris Mellon <[EMAIL PROTECTED]>
Sent: Tuesday, October 9, 2007 1:51:04 PM
> Because, by definition, if you have the key then you don't need to get
> it from the dict. What you're doing here is conflating 2 mappings into
> one: string value->person and person->values. Use 2 explicit dicts t
[EMAIL PROTECTED] writes:
> Matthias, thanks for the reference, but I dont have access to an
> engineering library. I would appreciate, if you have access to paper/
> scanner or electronic copy to help many of us out, you are
> not just helping me but many will thank you.
Given that you seem to b
On Oct 8, 7:32 am, Joost Kremers <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Don't both "man" and those words for measurement come ultimately from
> > words for "hand" (similarly to words like "manual", as in labor)?
>
> no.
Do not bluntly contradict me in public.
> "manual" is deri
[EMAIL PROTECTED] a écrit :
> Hi.
>
> I've got a question on the differences and how to define static and
> class variables.
What's a "static" variable ? A variable that doesn't move ?-)
> Hence, my understanding is that static variables must be bound to the
> class defining the variables
Yo
Marc 'BlackJack' Rintsch a écrit :
> On Tue, 09 Oct 2007 18:08:34 +, Steven D'Aprano wrote:
>
>
>L = []
>id(L)
>>
>>3083496716L
>>
>L += [1]
>id(L)
>>
>>3083496716L
>>
>>It's the same L, not rebound at all.
>
> It *is* rebound. To the same object, but it *is* assigned to `L`
Bruno Desthuilliers a écrit :
(snip)
> And it is *not* rebound:
Doh. Stupid me. Of course it is - but to a ref to the same object...
>>> class A:
... l = []
...
>>> class B(A): pass
...
>>> B.__dict__
{'__module__': '__main__', '__doc__': None}
>>> B.l
[]
>>> B.l += [1]
>>> B.__dict__
{'__m
On 10/9/07, Chris Mellon <[EMAIL PROTECTED]> wrote:
> On 09 Oct 2007 16:56:30 +0200, Stefan Arentz <[EMAIL PROTECTED]> wrote:
> >
> > Is it possible to mix classes defined in both Python and C in the same
> > module? Ideally I would like to be able to do:
> >
> > from some.module import MyPythonCl
When importing Java packages in Jython, what is the convention to
simplify imports? For example:
import java.util as util
Is this correct? Or should I use from * import *?
--
http://mail.python.org/mailman/listinfo/python-list
Hello everyone,
i'm new user of python, in fact, i'm using Control Desk from dsPACE. I
just want to change the programm a bit to fit to my application.
I draw xyplot using virsual instrument xyplot in Control Desk, and i
want to delect any curses if it's needed. But in Control Desk the
xyplot is
On Oct 10, 3:32 pm, "Nicholas Bastin" <[EMAIL PROTECTED]> wrote:
> On 10/9/07, Chris Mellon <[EMAIL PROTECTED]> wrote:
>
>
>
> > On 09 Oct 2007 16:56:30 +0200, Stefan Arentz <[EMAIL PROTECTED]> wrote:
>
> > > Is it possible to mix classes defined in both Python and C in the same
> > > module? Ideal
Since you are starting a new project you may want to look into
something new and different
http://mdp.cti.depaul.edu/examples
--
http://mail.python.org/mailman/listinfo/python-list
I just "upgraded" from M2Crypto 0.17 to M2Crypto 0.18, and I'm
running my regression tests. I'm seeing occasional cases where
M2Crypto raises the exception SSL.SSLError, and the associated
error is "(0, 'Error')", which is the bogus error you get if you feed 0 to
"perror". It failed once on "v
Hi,
My code looks like this:
for item in bigset:
self.__sub1(item)
self.__sub2(item)
self.__sub3(item)
# the subX functions, in turn, use various 3rd party modules.
Now, I would like to do this:
for item in bigset:
try:
self.__sub1(item)
self.__sub2(item)
self.__sub3(item)
On Oct 9, 2007, at 7:37 PM, Andreas Kraemer wrote:
> From: Chris Mellon <[EMAIL PROTECTED]>
> Sent: Tuesday, October 9, 2007 1:51:04 PM
>
> > Because, by definition, if you have the key then you don't need
> to get
> > it from the dict. What you're doing here is conflating 2 mappings
> into
>
On Oct 9, 2007, at 12:44 PM, Andreas Kraemer wrote:
> Hi everyone,
>
> I know that the subject of mutable objects as dictionary keys has
> been discussed a number of times in this forum (see for instance
> "freezing" of classes), but I would love to hear the thoughts of
> the experts on the
> Can anyone explain:
>
> (1) its origin
>From the Bibliographic Notes of Chapter 12 Continuations in a Functional
Language, Theories of Programming Languages by John C. Reynolds, page 370:
"A history of the repeated discoveries of continuations (occurring largely
in the context of functional lan
> If nothing else, please use Google. Many will thank you.
>
http://www.google.com/search?hl=en&q=Definitional+Interpreters+for+Higher-Order+Functions&btnG=Search
http://www.brics.dk/~hosc/vol11/contents.html
Definitional Interpreters for Higher-Order Programming Languages
Definitional Interpre
Corrected the links...
1. Programming Languages: Application and Interpretation
Shriram Krishnamurthi
Part VII Continuations
http://www.cs.brown.edu/~sk/Publications/Books/ProgLangs/2007-04-26/plai-2007-04-26.pdf
2. Essentials of Programming Languages (2nd edition)
Friedman, Wand and Haynes
Chapt
Hi,
Have any one faced such problem, I assume it must be common if it can
be replicated so easily , or something wrong with my system
Also if I use tar.members instead of tar.getmembers() it works
so what is the diff. between tar.members and tar.getmembers()
rgds
Anurag
--
http://mail.python.o
On 9 Okt, 17:18, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> lgwe wrote:
> > I have a python-script: myscript, used to start a program on another
> > computer and I use OptionParser in optpars.
> > I use it like this: myscript -H host arg1 -x -y zzz
> > I would like OptionParser to ignore all a
Just Another Victim of the Ambient Morality schrieb:
> "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Just Another Victim of the Ambient Morality schrieb:
>>> HTMLParser is behaving in, what I find to be, strange ways and I
>>> would like to better underst
hi.
i am trying to learn event binding. i have a form with a couple of buttons
for different tags, which all call the same function. the text on the
buttons changes from record to record. this is the problem area:
def showrecords(self):
"""this function updates the form labels to show
I apologize for being a dick. It won't happen again.
I was actually thinking that the 25 standard
timezones (which make a reasonable list or
can be easily generated by clicking a map)
could serve as a filter to make the detail
list reasonably sized.
Something like this:
import pytz
import dateti
I am on a Windows box.
I pickle a tuple of 2 simple objects with the pickle module.
It pickles fine. It unpickles fine.
I upload to a server.
I try to unpickle from the URL. No luck. Try it:
x1, x2 =
pickle.load(urllib.urlopen('http://www.american.edu/econ/notes/hw/example1'))
I change the f
>> Yes, it is.
>
> I'm afraid not.
>
> As I admitted in my reply to Marc, I overstated my case by saying that L
> isn't rebound at all. Of course it is rebound, but to itself.
>
> However, it is not true that += "always leads to a rebinding of a to the
> result of the operation +". The + opera
Diez B. Roggisch schrieb:
>>> Yes, it is.
>>
>> I'm afraid not.
>>
>> As I admitted in my reply to Marc, I overstated my case by saying that
>> L isn't rebound at all. Of course it is rebound, but to itself.
>>
>> However, it is not true that += "always leads to a rebinding of a to
>> the result
On Wed, 10 Oct 2007 05:58:51 +, Alan Isaac wrote:
> I am on a Windows box.
>
> I pickle a tuple of 2 simple objects with the pickle module.
> It pickles fine. It unpickles fine.
>
> I upload to a server.
> I try to unpickle from the URL. No luck. Try it:
> x1, x2 =
> pickle.load(urllib.u
101 - 153 of 153 matches
Mail list logo