On Feb 28, 12:46 am, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> By the way bearophile... the readability of your posts will increase a
> LOT if you break it up into paragraphs, rather than use one or two giant
> run-on paragraphs.
>
> My comments follow.
>
> On Tue, 26 Feb 2008
On Feb 28, 8:40 am, [EMAIL PROTECTED] wrote:
> But the default behavior may become the "true" copy, that seems
> simpler for a newbie to grasp. The language then may give a tool to
> use references too (like passing arrays to functions in Pascal, you
> can use "var" for pass-by-reference reference)
I have a data structure I think would be very useful. It passes a few
test cases, but one attempt to optimize it failed, so that may
indicate a bug. Will anyone help me debug it, verify it, or clean it?
It pertains to multi-threading and is a synchro. structure. If it is
not an interest of your
On Feb 28, 11:49 am, "Ethan Metsger" <[EMAIL PROTECTED]> wrote:
> Hi, all.
>
> I apologize for what is perhaps a newb question. I'm in the process of
> transitioning our testing framework from Perl to Python. While that alone
> probably sets off some red flags, I'm afraid it's what I'm stuck
On Feb 27, 6:02 pm, Tamer Higazi <[EMAIL PROTECTED]> wrote:
> Hi!
> Can somebody of you make me a sample how to define a function based on
> "call by reference" ???
>
> I am a python newbie and I am not getting smart how to define functions,
> that should modify the variable I passed by reference.
On Feb 28, 10:07 am, Mark Dickinson <[EMAIL PROTECTED]> wrote:
> On Feb 28, 5:02 am, Michael Robertson <[EMAIL PROTECTED]> wrote:
>
> > Thanks again for your efforts here. This particular problem didn't
> > appear in any course I took...certainly similar problems did.
>
> And here's the obligatory
that basically everything is a number in the end, then C is a
> > good choice. More portable than assembler but nearly as close to the
> > metal.
>
> And a better choice than C++ would be.
>
> > To the OP: If you try C++, don't hold that crappy language against C#, D,
On Feb 29, 12:55 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Thu, 28 Feb 2008 08:09:01 -0800 (PST), [EMAIL PROTECTED] declaimed
> the following in comp.lang.python:
>
> > My goal is to return Deadlock from acquire() if its blocking would
> > directly create deadlock. Basic example:
> [
On Feb 29, 12:55 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Thu, 28 Feb 2008 00:54:44 -0800 (PST), [EMAIL PROTECTED] declaimed
> the following in comp.lang.python:
>
> > On Feb 28, 2:30 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> > > "It is time to show your cards or fold"
>
> > H
On Feb 29, 5:56 am, Steve Holden <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > On Feb 27, 6:02 pm, Tamer Higazi <[EMAIL PROTECTED]> wrote:
> >> Hi!
> >> Can somebody of you make me a sample how to define a function based on
> >> "call by reference" ???
>
> >> I am a python newbie and I
On Feb 28, 3:18 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]
> | But the default behavior may become the "true" copy, that seems
> | simpler for a newbie to grasp.
>
> To me, it is the opposite. If I say
> gvr = Guido_van_Russum # o
On Feb 29, 8:12 am, Steve Holden <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > On Feb 29, 5:56 am, Steve Holden <[EMAIL PROTECTED]> wrote:
> >> [EMAIL PROTECTED] wrote:
> >>> On Feb 27, 6:02 pm, Tamer Higazi <[EMAIL PROTECTED]> wrote:
> Hi!
> Can somebody of you make me a samp
On Feb 29, 8:59 am, Steve Holden <[EMAIL PROTECTED]> wrote:
> Steve Holden wrote:
> > [EMAIL PROTECTED] wrote:
> > [...]
> > > If you want a computer language to model human thought, then is there
> >> even such thing as subclassing?
>
> > Kindly try to limit your ramblings to answerable questions
On Feb 29, 5:52 am, [EMAIL PROTECTED] wrote:
> On Feb 29, 12:55 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
>
> > On Thu, 28 Feb 2008 08:09:01 -0800 (PST), [EMAIL PROTECTED] declaimed
> > the following in comp.lang.python:
>
> > > My goal is to return Deadlock from acquire() if its blocking wo
The Python main interpreter has an at-exit list of callables, which
are called when the interpreter exits. Can threads have one? What's
involved, or is the best way merely to subclass Thread?
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 29, 1:55 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] schrieb:
>
> > The Python main interpreter has an at-exit list of callables, which
> > are called when the interpreter exits. Can threads have one? What's
> > involved, or is the best way merely to subclass Thre
On Feb 29, 2:12 pm, [EMAIL PROTECTED] wrote:
> On Feb 29, 1:55 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > [EMAIL PROTECTED] schrieb:
>
> > > The Python main interpreter has an at-exit list of callables, which
> > > are called when the interpreter exits. Can threads have one?
On Feb 29, 1:15 pm, Raymond Hettinger <[EMAIL PROTECTED]> wrote:
> [Robert Bossy]
>
> > I thought it would be useful if insort and consorts* could accept the
> > same options than list.sort, especially key and cmp.
>
> If you're going to do many insertions or searches, wouldn't it be
> *much* more
On Feb 29, 3:09 pm, "Terry Reedy" <[EMAIL PROTECTED]> wrote:
> "Bronner, Gregory" <[EMAIL PROTECTED]> wrote in message
>
> news:[EMAIL PROTECTED]
> | The native implementation of int goes to great lengths to allow
> | illogical comparisons such as the one below.
> | >>> import xml as x
> | >>> x
>
On Feb 29, 4:34 pm, Preston Landers <[EMAIL PROTECTED]> wrote:
> On Feb 29, 2:12 pm, [EMAIL PROTECTED] wrote:
>
> > If a thread adds an object it creates to a nonlocal
> > collection, such as a class-static set, does it have to maintain a
> > list of all such objects, just to get the right ones de
from __future__ import with_statement
'''
3) upon_acquiring( lockA, lockB )( function, *ar, **kwar )
upon_acquiring spawns new thread upon acquiring locks A and B. Locks
may be specified in any order, as none is acquired until all are free.
The options to spawn a new thread upon call, lock, and
On Mar 1, 11:54 am, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> nexes schrieb:
>
> > Hello All,
> > I am having a minor problem when I try and do this:
> > c.execute("insert into [tblTranscripts] (MovieID,Transcript)
> > Values(" + movieID + ",'" + formatText + "');") (don't even bot
On Mar 1, 10:07 am, Lorenzo Gatti <[EMAIL PROTECTED]> wrote:
> On Mar 1, 3:39 pm, Schizoid Man <[EMAIL PROTECTED]> wrote:
>
> > As in variable assignment, not homework assignment! :)
>
> > I understand the first line but not the second of the following code:
>
> > a, b = 0, 1
> > a, b = b, a + b
>
On Mar 1, 2:05 pm, "K Viltersten" <[EMAIL PROTECTED]> wrote:
> I'm reading the docs and at 5.2 the del
> statement is discussed. At first, i thought
> i've found a typo but as i tried that
> myself, it turns it actually does work so.
>
> a = ["alpha", "beta", "gamma"]
> del a[2:2]
> a
>
> Now
RPC might be -really- easy.
Mixin class:
getattribute returns a remoting callable if ('name') is callable, or
in a special list. On call, pack the parameters, execute locally, and
broadcast. You'd need two mixins, BroadcasterMixin and ReceiverMixin,
but the same code can still run-- how can beh
On Mar 1, 6:49 pm, "K Viltersten" <[EMAIL PROTECTED]> wrote:
> >> When that fails, try without the stutter
>
> >> import tkinter
>
> > I must be doing something wrong because
> > neither tkinter nor tkininter works.
> > I tried both with and without stuttering.
> > I even asked my wife to stutter
On Mar 1, 2:58 pm, Michael Torrie <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Tell Wall. But why not [ 2, 3 ]>= 2? Back to your question, another
> > option is to not subclass.
>
> Umm, no. You need to actually read the posts before you respond to
> them. His question was whether
On Mar 1, 8:50 pm, Michael Torrie <[EMAIL PROTECTED]> wrote:
> I need to use a lambda expression to bind some extra contextual data
> (should be constant after it's computed) to a call to a function. I had
> originally thought I could use something like this demo (but useless) code:
>
> funcs=[]
>
On Mar 2, 4:49 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Sun, 02 Mar 2008 08:25:49 -0200, Schizoid Man <[EMAIL PROTECTED]> escribi�:
>
>
>
>
>
> > Lorenzo Gatti wrote:
> >> On Mar 1, 3:39 pm, Schizoid Man <[EMAIL PROTECTED]> wrote:
> >>> As in variable assignment, not homework assignm
'''
a website wants to show you different arrangements of framed pictures
on a wall. you can click, drag, scale, and rotate pictures in place.
you can also drag new pictures in to it.
spacing is uniform and settable-- if you rotate one, the readout of
the total square area changes along with the
On Mar 2, 8:15 am, Giles Brown <[EMAIL PROTECTED]> wrote:
> On Mar 2, 2:08 pm, Preben Randhol
> [EMAIL PROTECTED]> wrote:
> > On Sun, 2 Mar 2008 15:06:17 +0100
>
> > Preben Randhol <[EMAIL PROTECTED]> wrote:
> > > class dbase(list):
>
> > Sorry the definition of the class is:
>
> > clas
On Mar 2, 9:55 am, Sam <[EMAIL PROTECTED]> wrote:
> You may use python in interactive mode:
>
> $ python -i yourScript.py
>
> Or use a blocking readline:
>
> $ cat yourScript.py
> import sys
> sys.stdin.readline()
>
> ++
>
> Sam
FWIW, for what it's worth, you can invoke the interpreter from a batc
On Mar 2, 8:41 am, Andrew Warkentin <[EMAIL PROTECTED]> wrote:
> I am writing a filtering HTTP proxy (the site
> ishttp://xuproxy.sourceforge.net/). I want it to be compatible with
> Proxomitron (http://proxomitron.info/) filters. I need a regular
> expression parser that allows patterns to call f
On Mar 2, 11:44 am, Steve Holden <[EMAIL PROTECTED]> wrote:
> TC wrote:
> > On Mar 2, 11:37 am, Gary Herron <[EMAIL PROTECTED]> wrote:
> >> TC wrote:
> >>> I have a problem. Here's a simplified version of what I'm doing:
> >>> I have functions a() and b() in a module called 'mod'. b() calls a().
On Mar 2, 11:45 am, Steve Holden <[EMAIL PROTECTED]> wrote:
> I suspect what you need is the .replace() method.
The information's there-- the word 'contiguous' might clear it up a
bit.
> > Return a copy of the string with the
> > leading and trailing characters removed.
> > The chars argument is
On Mar 2, 12:01 pm, John DeRosa <[EMAIL PROTECTED]> wrote:
> On Mon, 3 Mar 2008 01:23:32 +0900, js <[EMAIL PROTECTED]> wrote:
> >Hi,
>
> >Have you ever seen Beautiful Python code?
> >Zope? Django? Python standard lib? or else?
>
> >Please tell me what code you think it's stunning.
>
> Just about an
On Mar 2, 11:38 am, Steve Holden <[EMAIL PROTECTED]> wrote:
> Nobody thinks you are a fool for wanting help with your problems, it's
> simply that you have to provide enough information about what' wring for
> us to get a handle on the issues.
This worked:
import socket
from time import time
for
'''
Last time, we left off at:
'''
class InterfaceClientSide( ClientSide ):
message= MessageDec()
incremental= message.incremental()
settings= AYT( .5, 3 )
user_act= message.out()
def __init__( self, image ):
self._image= image
On Feb 25, 11:04 am, [EMAIL PROTECTED] wrote:
> > B1.fun(A(x), A(y), A(z)) == B.fun(A(x), A(y), A(z))
> > but
> > B1.fun(A1(x), A(y), A(z) != B.fun(A1(x), A(y), A(z))
>
> > Is there a data-structure solution or third party module that would
> > mimic this behavior?
>
> class B:
> xfun= Overloade
> >>> is there a better way of creating d??
>
> >> a = [[0] * 3 for dummy in xrange(3)]
>
> Each element of a refers to a distinct array.
>
> > Why not simply [[0]*3]*3 ?
>
> All three elements of the result refer to the same array.
... whereas you reassign all three elements of [0]* 3.
>>> ((0,)
On Feb 27, 5:38 pm, [EMAIL PROTECTED] wrote:
> On Feb 27, 4:16 pm, "Gabriel Genellina" <[EMAIL PROTECTED]>
> > For a), you use something like obj.a.somemethod(). "obj.a" still refers to
> > the same object, even if it changed internally; if obj.a and foo.bar both
> > were refering to the same objec
On Mar 3, 7:11 am, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote:
> On Tue, 26 Feb 2008 21:45:24 -0800, Dennis Lee Bieber <[EMAIL PROTECTED]>
> wrote:
>
> > [snip]
>
> > Threads, in Python, are good for parallel processing of items that
> >tend to be I/O bound -- that is, stuff that blocks on l
On Mar 3, 5:09 pm, Tro <[EMAIL PROTECTED]> wrote:
> On Sunday 02 March 2008, Paul McGuire wrote:
>
>
>
>
>
> > On Mar 2, 3:48 pm, Tro <[EMAIL PROTECTED]> wrote:
> > > On Sunday 02 March 2008, Terry Reedy wrote:
> > > > "Tro" <[EMAIL PROTECTED]> wrote in message
> > > >news:[EMAIL PROTECTED]
>
> > >
On Mar 3, 4:30 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> On Mar 2, 1:18 pm, [EMAIL PROTECTED] wrote:
>
> > On Mar 2, 12:01 pm, John DeRosa <[EMAIL PROTECTED]> wrote:
>
> > > On Mon, 3 Mar 2008 01:23:32 +0900, js <[EMAIL PROTECTED]> wrote:
> > > >Hi,
>
> > > >Have you ever seen Beautiful
What are metaclasses?
--
http://mail.python.org/mailman/listinfo/python-list
> All software has bugs.
> Good software has bugs.
Therefore, good software is software.
> This makes sympy worse than worthless, as it f***s up other modules.
What is it still good for?
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 3, 8:22 pm, "Daniel Fetchinson" <[EMAIL PROTECTED]>
wrote:
> > What are metaclasses?
>
> http://www.google.com/search?q=python+metaclass
>
> HTH,
> Daniel
Not satisfied.
http://en.wikipedia.org/wiki/Metaclass#Python_example
That's a limitation. The constructor can omit the superclass cal
On Mar 3, 4:03 pm, Carl Banks <[EMAIL PROTECTED]> wrote:
> On Mar 3, 4:17 pm, Raymond Hettinger <[EMAIL PROTECTED]> wrote:
>
> > Since Python doesn't support having two methods with the same name,
> > the usual solution is to provide alternative constructors using
> > classmethod():
>
> > @classm
On Mar 3, 10:01 pm, Benjamin <[EMAIL PROTECTED]> wrote:
> On Mar 3, 7:12 pm, [EMAIL PROTECTED] wrote:
>
> > What are metaclasses?
>
> Depends on whether you want to be confused or not. If you do, look at
> this old but still head bursting
> essay:http://www.python.org/doc/essays/metaclasses/.
>
>
On Mar 4, 10:50 am, Lie <[EMAIL PROTECTED]> wrote:
> On Mar 4, 1:12 pm, Mensanator <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > On Mar 3, 11:58 pm, Erik Max Francis <[EMAIL PROTECTED]> wrote:
>
> > > Mensanator wrote:
> > > > While we're on the subject of English, the word "worthless"
> > > > means "ha
On Mar 4, 12:51 am, Gerard Flanagan <[EMAIL PROTECTED]> wrote:
> On Mar 4, 6:31 am, [EMAIL PROTECTED] wrote:
>
>
>
>
>
> > On Mar 3, 10:01 pm, Benjamin <[EMAIL PROTECTED]> wrote:
>
> > > On Mar 3, 7:12 pm, [EMAIL PROTECTED] wrote:
>
> > > > What are metaclasses?
>
> > > Depends on whether you want
On Mar 4, 5:27 am, Bruno Desthuilliers wrote:
> ?? a écrit :
>
> > Howdy everyone,
>
> > This is a big problem puzzles me for a long time. The core question is:
> > How to dynamically create methods on a class or an instance?
>
> class Foo(object):
> pass
>
> def bar(self, arg):
> pri
On Mar 3, 10:34 pm, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Mon, 3 Mar 2008 07:00:55 -0800 (PST), [EMAIL PROTECTED] declaimed
> the following in comp.lang.python:
>
> > What's the API call for it?
>
> I'd suspect one of the win32event.WaitFor..., when combined with
> win32file.Cre
Would you like it to be removed or its name changed?
You can do it with a special iteration:
for a in B:
if behavior
break
else:
2behavior
>
class KeepResult:...
kr= KeepResult( B )
for a in kr:
if behavior
break
if kr.diditbreak?:
2behavior
(if not:
3behavior)
I
> > So, to answer your question: what you are decorating are functions, not
> > methods.
>
> Can you overload -type-'s decision of what to 'bind'?... whenever it
> is it makes it.
>>> from types import FunctionType, MethodType
>>> class A( FunctionType ): pass
...
Traceback (most recent call last)
On Mar 4, 8:11 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Tue, 04 Mar 2008 16:45:40 -0200, <[EMAIL PROTECTED]> escribió:
>
> >> > So, to answer your question: what you are decorating are functions,
> >> not
> >> > methods.
>
> >> Can you overload -type-'s decision of what to 'bind'?.
On Mar 4, 7:06 pm, Tommy Grav <[EMAIL PROTECTED]> wrote:
> On Mar 4, 2008, at 4:53 PM, Jeff Schwab wrote:
>
> > What does "SV" in the subject mean?
>
> SV = "Svar" is the Norwegian word for Reply.
>
> Cheers
> Tommy
It is also the name of my lockermate in grade school. "So, Svar, how
'bout the
That you could do yourself, CMIIW correct me if I'm wrong.
try:
for foo in iterex( bar_sequence ):
> # normal iteration
> spam(foo)
> if funky(foo):
> break
except StopIterationEx, exc:
> # the iterator stopped normally
> eggs(exc)
>
On Mar 4, 9:46 pm, Jason Galyon <[EMAIL PROTECTED]> wrote:
> Gabriel Genellina wrote:
> > En Tue, 04 Mar 2008 23:50:49 -0200, Jason <[EMAIL PROTECTED]> escribió:
>
> >> How could I return a list or tuple of each unique combination of a given
> >> set of lists (perhaps from a dict or a list). This
On Mar 4, 9:01 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Wed, 05 Mar 2008 00:30:26 -0200, <[EMAIL PROTECTED]> escribió:
>
> > On Mar 4, 8:11 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> >> En Tue, 04 Mar 2008 16:45:40 -0200, <[EMAIL PROTECTED]> escribió:
>
> >> >> Can you over
On Mar 4, 9:53 pm, [EMAIL PROTECTED] wrote:
> > >> >> Can you overload -type-'s decision of what to 'bind'?... whenever it
> > >> >> is it makes it.
>
> > >> from types import FunctionType, MethodType
> > >> class A( FunctionType ): pass
> > >> > ...
> > >> > Traceback (most recent call l
On Mar 4, 5:59 pm, David Bolen <[EMAIL PROTECTED]> wrote:
> Dennis Lee Bieber <[EMAIL PROTECTED]> writes:
>
>
>
>
>
> > On Mon, 3 Mar 2008 08:11:43 -0500, Jean-Paul Calderone
> > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python:
>
> >> I'm not sure, but you seem to be implying that t
> How does it work? From reading threading.py, _Condition.wait()
> acquires self.lock() too many times-- that is, once to call wait
> ("cannot wait on un-aquired lock"), and once after--- are "all
> waiters" waiting back at self.acquire, just to make it to
> self.notify... and only one at a time a
> > > >> >> Can you overload -type-'s decision of what to 'bind'?... whenever it
> > > >> >> is it makes it.
>
> > > >> from types import FunctionType, MethodType
> > > >> class A( FunctionType ): pass
> > > >> > ...
> > > >> > Traceback (most recent call last):
> > > >> > File "", line
On Mar 4, 10:57 pm, [EMAIL PROTECTED] wrote:
> > > > >> >> Can you overload -type-'s decision of what to 'bind'?... whenever
> > > > >> >> it
> > > > >> >> is it makes it.
>
> > > > >> from types import FunctionType, MethodType
> > > > >> class A( FunctionType ): pass
> > > > >> > ...
>
On Mar 4, 11:12 pm, Michael Torrie <[EMAIL PROTECTED]> wrote:
> Does anyone have any recommended ideas/ways of implementing a proper
> control and status protocol for communicating with threads? I have a
> program that spawns a few worker threads, and I'd like a good, clean way
> of communicating
What is a class that is not a module?
--
http://mail.python.org/mailman/listinfo/python-list
I want to hash values to keys. How do the alternatives compare?
--
http://mail.python.org/mailman/listinfo/python-list
On Mar 5, 6:12 am, Tim Chase <[EMAIL PROTECTED]> wrote:
> > if (match = re.search('(\w+)\s*(\w+)', foo)):
>
> Caveat #1: use a raw string here
> Caveat #2: inline assignment is verboten
>
> match = re.search(r'(\w+)\s*(\w*+)', foo)
> if match:
>
> > field1 = match.group(1)
> > field
On Mar 5, 1:29 pm, Paul McGuire <[EMAIL PROTECTED]> wrote:
> On Mar 5, 12:50 pm, [EMAIL PROTECTED] wrote:
>
> > What is a class that is not a module?
>
> Please stop posting these one-liner beginner questions. If you can
> type it in one line, you can enter it on the Google.com or Ask.com
> query
On Mar 5, 1:13 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] schrieb:
>
> > I want to hash values to keys. How do the alternatives compare?
>
> http://catb.org/~esr/faqs/smart-questions.html
... without extending the whole way to a full relational database?
--
http://mail
> > > > What is a class that is not a module?
>
> > I'm willing to address convention, in serial or parallel--- (change
> > subject to 'what goes on newsgroups'?), but it's not clear from fact
> > what assumption who has made.
>
> Since you did not elaborate on what your efforts were and the extent
On Mar 5, 3:38 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Wed, 05 Mar 2008 12:06:11 -0800, castironpi wrote:
> > On Mar 5, 1:13 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> >> [EMAIL PROTECTED] schrieb:
>
&
On Mar 5, 3:38 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Wed, 05 Mar 2008 12:06:11 -0800, castironpi wrote:
> > On Mar 5, 1:13 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> >> [EMAIL PROTECTED] schrieb:
>
&
On Mar 5, 3:58 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Wed, 05 Mar 2008 10:50:12 -0800, castironpi wrote:
> > What is a class that is not a module?
>
> Er, all of them?
>
> I'm curious what classes you think are modules.
>
&
On Mar 5, 4:00 pm, Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2008-03-05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> > I want to hash values to keys. How do the alternatives compare?
>
> http://catb.org/~esr/faqs/smart-questions.html
>
> >>> ... without extending the whole way to
On Mar 5, 5:31 pm, Grant Edwards <[EMAIL PROTECTED]> wrote:
> On 2008-03-05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Anyway, if (a,b) is a key in dictionary d, can it guarantee
> > that (b,a) is also in it, and maps to the same object?
Er... -specialized- dictionary d.
> To solve that pr
On Mar 5, 4:25 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Wed, 05 Mar 2008 13:49:20 -0800, castironpi wrote:
> > Classes and modules are really similar. In Python they're really
> > *really* similar.
>
> Yes they are.
>
> Bot
On Mar 5, 6:40 pm, [EMAIL PROTECTED] wrote:
> Troels Thomsen:
>
> > The discussion of words is silly. My surprise about "else following a for
> > loop what the heck " lasted excactly as long as it takes to read
> > this sentence.
>
> Maybe I don't follow what you are saying, but well chosen
On Mar 5, 6:09 pm, sambo q <[EMAIL PROTECTED]> wrote:
> I got myself in jam trying to be too fancy with threading.Thread
> Docs say / remind to call the base __init__
> but I can't fighure out how.
>
> ---
> def main()
> .
> ls.listen(5)
> key = ' '
> # while
On Mar 5, 6:09 pm, sambo q <[EMAIL PROTECTED]> wrote:
> I got myself in jam trying to be too fancy with threading.Thread
> Docs say / remind to call the base __init__
> but I can't fighure out how.
>
> ---
> def main()
> .
> ls.listen(5)
> key = ' '
> # while
On Mar 5, 8:31 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> On Wed, 05 Mar 2008 21:05:31 -0500, Terry Reedy wrote:
> > If I understand your question, classes are not singletons:
> ll=[]
> for i in range(2):
> > import string
> > ll[i]=string
>
> Where's the IndexE
> > > If I understand your question, classes are not singletons:
> > ll=[]
> > for i in range(2):
> > > import string
> > > ll[i]=string
>
> > Where's the IndexError? :-)
>
> > I accept my question about classes being singletons is not well-formed,
> > not even in my own mind. I guess o
On Mar 5, 8:03 pm, [EMAIL PROTECTED] wrote:
> On Mar 5, 5:31 pm, Grant Edwards <[EMAIL PROTECTED]> wrote:
>
> > On 2008-03-05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > > Anyway, if (a,b) is a key in dictionary d, can it guarantee
> > > that (b,a) is also in it, and maps to the same object?
On Mar 5, 9:51 pm, [EMAIL PROTECTED] wrote:
> > > > If I understand your question, classes are not singletons:
> > > ll=[]
> > > for i in range(2):
> > > > import string
> > > > ll[i]=string
>
> > > Where's the IndexError? :-)
>
> > > I accept my question about classes being singletons
On Mar 5, 8:06 pm, [EMAIL PROTECTED] wrote:
> On Mar 5, 4:25 pm, Steven D'Aprano <[EMAIL PROTECTED]
>
> cybersource.com.au> wrote:
> > On Wed, 05 Mar 2008 13:49:20 -0800, castironpi wrote:
> > > Classes and modules are really similar. In Python they're
> > *plonk*
>
> > key is an iterable, just like the constructors to
> > other collection.
>
> Um... "*plonk*" is the (imaginary) sound made by dropping someone into
> your plonkfile (killfile, scorefile, whatever): the action of setting
> your newsreader to ignore someone you perceive to be a trol
> I accept my question about classes being singletons is not well-formed,
> not even in my own mind. I guess one way of asking is, for any two class
> objects (not instances) C1 and C2, does "C1 == C2" imply "C1 is C2"?
C and D are instances of metaC in that.
class metaC( type ):
def what( self
On Mar 6, 2:37 am, Bryan Olson <[EMAIL PROTECTED]> wrote:
> Grant Edwards wrote:
> > It may be obvious that he has a question. It's not the least
> > bit obvious what that question is.
>
> How can we efficiently implement an abstract data type, call it
> 'DoubleDict', where the state of a DoubleD
On Mar 6, 12:17 am, "Daniel Fetchinson" <[EMAIL PROTECTED]>
wrote:
> > > Where to begin?
>
> > What does exec( open( 'modA.py' ).read() ) do?
>
> The most appropriate list to ask those questions is:
>
> http://mail.python.org/mailman/listinfo/tutor
Thanks for the reference. I'm basically experien
On Mar 6, 5:16 am, Bryan Olson <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Bryan Olson wrote:
> >> How can we efficiently implement an abstract data type, call it
> >> 'DoubleDict', where the state of a DoubleDict is a binary
> >> relation, that is, a set of pairs (x, y); and the oper
> Actually, there's another data structure I was working on (a year ago
> now) that's tangentially related, so if you guys want me to hold off
> on that one til you or I is satisfied on the company-product map, I
> will! Otherwise, I'll just post it here and leave it to you.
> (Knowing myself, som
On Mar 6, 10:47 am, "D'Arcy J.M. Cain" <[EMAIL PROTECTED]> wrote:
> On Thu, 6 Mar 2008 07:58:06 -0800 (PST)
>
> Carl Banks <[EMAIL PROTECTED]> wrote:
> > > I don't want to have to tag every thread. I just want to *plonk*
> > > certain posters.
>
> > > Anyway, I'll live with Google's failings I gue
> > > > I'm talking about castironpi. I find his posts a waste of my time
>
> > > "His" posts?
>
> > Whatever. I'm too old to worry about searching for politically correct,
> > gender neutral pronouns.
>
> I'm pretty sure ev
On Mar 6, 8:30 am, Carl Banks <[EMAIL PROTECTED]> wrote:
> On Mar 5, 8:44 pm, Steven D'Aprano <[EMAIL PROTECTED]
>
> cybersource.com.au> wrote:
> > But what about classes? Are they singletons? Obviously classes aren't
> > Singleton classes, that is, given an arbitrary class C you can create
> > mul
On Mar 6, 1:03 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> On Mar 5, 7:50 pm, [EMAIL PROTECTED] wrote:
>
> > What is a class that is not a module?
>
> A class is a bag of stuff and a namespace :)
>
> J.
A module is a bag of stuff and a namespace. Different stuff.
{ '__module__', '__weak
On Mar 6, 2:57 pm, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote:
> On Thu, 06 Mar 2008 11:06:50 -0800, castironpi wrote:
> > On Mar 6, 8:30 am, Carl Banks <[EMAIL PROTECTED]> wrote:
> >> Anyway, the answer to what you are probably asking is No. Try
> > Does anyone have any recommended ideas/ways of implementing a proper
> > control and status protocol for communicating with threads? I have a
> > program that spawns a few worker threads, and I'd like a good, clean way
> > of communicating the status of these threads back to the main thread.
>
On Mar 6, 3:24 pm, [EMAIL PROTECTED] (Aahz) wrote:
> In article <[EMAIL PROTECTED]>,
> Steven D'Aprano <[EMAIL PROTECTED]> wrote:
>
>
>
> >I accept my question about classes being singletons is not well-formed,
> >not even in my own mind. I guess one way of asking is, for any two class
> >objects
On Mar 6, 5:35 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> En Wed, 05 Mar 2008 02:57:58 -0200, <[EMAIL PROTECTED]> escribi�:
>
>
>
>
>
> >> > > >> >> Can you overload -type-'s decision of what to 'bind'?...
> >> whenever it
> >> > > >> >> is it makes it.
>
> >> > > >> Use delegation inst
201 - 300 of 1034 matches
Mail list logo