(I think it's just convention, really. You don't have to use one class
per module in Python, and given that freedom, most Python programmers
didn't.)
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
Carl J. Van Arsdall wrote:
> Carl Banks wrote:
> > Carl J. Van Arsdall wrote:
> >> A module per class makes a lot of sense in some cases, or rather, make
> >> your module your class (look at the singleton pattern). I actually like
> >> to structure all of
, and that's
doubtful. OTOH, something like this has decent shot of appearing in a
standard functional or iterator module of some sort.
> Thanks for replying me.
You're welcome in advance. Also, one note about comp.lang.python
and/or python-list: it's conventional here to put replies beneath the
quoted text. This is for the benefit of future readers, so they don't
have read conversations in reverse order.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
way to nest for and if clauses in listcomps, and the two
methods are considered distinct. Although Guido has said that saving
indentation levels is important, he hasn't said anything (that I'm
aware of) that suggests it's important enough to add this complexity
and redundancy
nvince
him. By the way, I'd suggest when posting to comp.lang.python and/or
python-list in the future, you put your replies beneath the quoted text
for the benefit of any future readers (not to mention present readers).
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
at wrote:
> Carl Banks wrote:
>
> > at wrote:
> >> Well, all I can say that for me as a user it would make sense...
> >
> > Which is, like, step one out of a hundred for getting a syntax change
> > into the language.
> >
> >> Curiosity: in what
read, making sense is about step one out of a
hundred for getting your change into the language.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
.
If you think that this change was made for "psychological" reasons, you
are terribly deluded.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
ve with, therefore it has to make
sense for the community as a whole, not just one person. But you've
completely ignored concerns that don't apply to YOU this whole thread.
Carl Banks
PS. You're top-posting again. Please respect other readers.
--
http://mail.python.org/mailman/listinfo/python-list
tent" fear is a better word. It's like when people are
deathly afraid to get on an airplane, but think nothing of riding in a
car without a seatbelt.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
ef same_method(a,b):
return a.im_class is b.im_class and a.im_func is b.im_func and
a.im_self is b.im_self
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
ler
always knows the exact type of a direct, non-pointer-accessed object.
So even if you could create a class_, it would only ever be a
Base, and never a derived class. You have to use pointers to get
polymorphism.
As an alternative, consider wrapping the derived classes instead. It
might not be much more work if Boost wraps everything nicely.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
ontain Python objects
(__dict__ excepted).
tuples, frozensets, instancemethods, are immutable but do contain
Python objects.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
x27;re overreacting? Try checking the SVN tomorrow. Even Python
programs can have downtime.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
t questions to answer. "What is wrong with my code?" is
> > a container of many many smaller questions, and you need to focus your
> > questions better.
>
> it says that progress_table is not defined. i don't know why.
It looks like you have bigger problems than an undefined variable.
Python does not have implicit access to methods and attributes
(members) like C++ and Java do. Methods must accept an explicit self
parameter that refers to the object (analogous to this in C++ and Java)
to access attributes. Your code defines a class, but self is nowhere
to be found.
I suggest getting a good book and/or reading the tutorial
(http://docs.python.org/tut/) and making sure you can do easy stuff
first.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
Pyenos wrote:
> thanks for your point. so because i have said class blah: i must
> explicitly say self for every instantiation of object?
http://docs.python.org/tut/
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
Kent Johnson wrote:
> Carl Banks wrote:
> > Now, I think this is the best way to use modules, but you don't need to
> > use modules to do get higher-level organization; you could use packages
> > instead. It's a pain if you're working on two different classe
sses--though in
fairness the one with 24 has a bunch of small mixins.) Soon as this
overloaded holiday season is over, they're getting broken up.
> So... there's no magic "one size fits all" answer here - do what makes
> sense.
>
> As Carl points out, decen
Paddy wrote:
> Carl Banks wrote:
> > Erik Johnson wrote:
> > > The file has now grown into a 6800 line beast (including docstring,
> > > whitespace, and CVS history). Pretty much any time we implement some new
> > > functionality, there are at least
ctoring,
it's a partial solution hack that'll lead to more confusion and delay a
real solution even more.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
t. For example, can requests come in
fast enough to spawn another load_data before the first had ended? You
should consider trying to acquire a threading.Lock in load_data and
waiting and/or returning immediately if you can't. Other things can go
wrong, too. Using threads requires care. But hopefully this'll get
you started.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
Gabriel Genellina wrote:
> At Friday 22/12/2006 22:58, Carl Banks wrote:
>
> > > Usually no other files need to change. Ex: you have BigOldModule
> > > including ClassA, ClassB and FunctionC. Move each one onto its own
> > > module, perhaps including a
Kent Johnson wrote:
> Carl Banks wrote:
> > Kent Johnson wrote:
> >> Carl Banks wrote:
> >>> Now, I think this is the best way to use modules, but you don't need to
> >>> use modules to do get higher-level organization; you could use packages
>
ion.
Try this:
fd = os.dup(1)
os.close(1)
sys.stdout = os.fdopen(fd)
It's poor design and extremely inconsiderate for a library to print to
stdout except as an overridable default.(Not to mention it gives
ammo to people who want dynamically scoped globals.) A long term
solution might be to hag
Carl Banks wrote:
> [EMAIL PROTECTED] wrote:
> > After some trials I found that put "os.close(1)" before calling the
> > function will depress the output. In fact, "os.close(1)" closed
> > standard output, but I don't know how to open it again af
cape":
>>> a = u'\u1234'
>>> a
u'\u1234'
>>> print a
ሴ
>>> ord(a)
4660
>>> hex(ord(a))
'0x1234'
>>> a.encode('unicode_escape')
'\\u1234'
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
van Rossum as I am, simply because
> so-and-so says something is bad and therefore it must be true is a
> fallacious response.
The same could be said of Smalltalk, i.e., because Smalltalk does it
therefore it is good is just as fallacious.
Regardless, whatever Guido pronounces is what happens. If he's
adamantly against something, it's pretty much an academic discussion.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
the first thing you should
have done is to not cross-post this.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
Paddy wrote:
> Carl Banks wrote:
> > If you were so keen on avoiding a flame war, the first thing you should
> > have done is to not cross-post this.
>
> I want to cover Pythonistas looking at Lisp and Lispers looking at
> Python because of the thread. The cross post
ample:
[ x-y for (x,y) in zip(a[1:],a[:-1]) ]
Or, to avoid creating two new arrays, use iterators:
import itertools
[ x-y for (x,y) in
itertools.izip(itertools.islice(a,0,-1),itertools.islice(a,1)) ]
Carl
--
http://mail.python.org/mailman/listinfo/python-list
ter Word. You have to call the
class object, same as you'd call a function, so you have to follow it
with parentheses:
s1.append(Word())
You could, in fact, have an array of classes, and there are actually
reasons you might want to do that, but that's pretty advanced.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
7;Traceback (most recent call last):
> File "", line 1, in
> sqrt(9)
> NameError: name 'sqrt' is not defined'
The third argument to the builtin pow is a special usage for
cryptography, and something specific like that needs no representation
in the builtin n
guments that a normal type constructor does, so you get the error.
Does that clear things up? Probably not. For a detailed explanation
of how this all works, look for some resources on learning
"metaclasses" or "metatypes" in Python.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
results in a more informative error message
But, in the end, if someone wants to define a class that defiantly
refuses to declare a method, you can't stop them.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
p
in a dictionary is that, in many real applications, the pin name would
often be specified in the input. (This is very often the case whenever
people want to know the symbol an object is bound to, for any
application.)
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
Fuzzyman wrote:
> Carl Banks wrote:
> > jeremito wrote:
> > > I am writing a class that is intended to be subclassed. What is the
> > > proper way to indicate that a sub class must override a method?
> >
> > You can't (easily).
> >
>
> Well
,
you might as well just use globals() and do it explicitly, rather than
mucking around with Python frame internals. (And it doesn't make the
class unusable for more straightforward uses.)
for _name in ('aap','dcr'):
globals()[_name] = Pin(_name)
del _name
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
Martin Miller wrote:
> Carl Banks wrote:
>
> > Martin Miller wrote:
> > > ### non-redundant example ###
> > > import sys
> > >
> > > class Pin:
> > > def __init__(self, name, namespace=None):
> > > self.name = name
tate])
> ...
> A
> B
> C
Good idea. But we can eliminate the dictionary lookup:
a1 = compile('print "A"; state=b1','','exec')
b1 = compile('print "B"; state=c1','','exec')
c1 = compile('print "C"; state=None','','exec')
state = a1
while state:
eval(state)
Cheers,
Carl
--
http://mail.python.org/mailman/listinfo/python-list
s_on = compile('''
print 'on'
action = next_action()
if action == 'lift':
state = s_on
elif action == 'push':
state = s_off
else:
state = None
''','','exec')
s_off = compile('''
print
n python (without resorting to bytecode
hacks) under the thread "Python code written in 1998, how to
improve/change it?". That would be a part of what you want.
Cheers,
Carl.
--
http://mail.python.org/mailman/listinfo/python-list
clock()
#print "action generator:",z-a
next_action = actions(r).next
#print "---"
state = s_on # start state
#a = time.clock()
while state:
eval(state)
#z = time.clock()
#print z-a
print "---"
next_action = actions(r).next
s_g_on = g_on()
s_g_off = g_off()
state = s_g_on
#a = time.clock()
while state:
print id(state)
state = state.next()
#z = time.clock()
#print z-a
#Cheers,
#Carl.
--
http://mail.python.org/mailman/listinfo/python-list
Fredrik Lundh wrote:
> Carl Cerecke wrote:
>
>
>>It turns out that generators are more efficient than the eval function
>>excuting bits of compiled code. About 20-25% faster.
>
>
> why are you using generators to return things from a function, when
> you can ju
Carl Cerecke wrote:
> Fredrik Lundh wrote:
>
>> Carl Cerecke wrote:
>>
>>
>>> It turns out that generators are more efficient than the eval function
>>> excuting bits of compiled code. About 20-25% faster.
>>
>>
>>
>> why are you
Adding a continue statemtent after the yield statements yields :-) a
speed increase. Still not as good as functions though. (about 30% slower)
Cheers,
Carl
Carl Cerecke wrote:
> Carl Cerecke wrote:
> Generator FSM done properly (well, better anyway). They are still almost
> twice a
code.
Running this code will print out the generated FSM code for both a
while/break implementation of the FSM and a function-based
implementation. It then does some timing measurements.
Cheers,
Carl.
#!/usr/bin/env python
from StringIO import StringIO
# number of random inputs fed to the FSM (if we
Paul Rubin wrote:
> Carl Cerecke <[EMAIL PROTECTED]> writes:
>
>>3. Not as fast as byte code hacks, or using pyrex/psyco. Peter Hansen
>>is right. One of those is likely a better solution if you don't need
>>pure python.
>
>
> If you don'
One list with nine elements, each of which is a list with nine numbers.
[[5,2,7,3,9,8,1,4,6],
[3,1,4,],
]
Cheers,
Carl.
--
http://mail.python.org/mailman/listinfo/python-list
ble. It cuts down on the
sensory overload from the previous site. And, it passes the no-style
litmus test (i.e.,whether you can still read and understand the site
with the style sheets disabled.)
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
it. Any help?
>
Try:
pexpect.sourceforge.net
Cheers,
Carl.
--
http://mail.python.org/mailman/listinfo/python-list
, list.append)
This is an impressive, spiffy little class.
> Well?
I suspect it's too sneaky and not commonly useful enough to get serious
consideration for the standard library. But definitely submit it to
Python Cookbook:
http://aspn.activestate.com/ASPN/Python/Cookbook/
Carl Banks
P
Alex Martelli wrote:
> Carl Banks <[EMAIL PROTECTED]> wrote:
>...
> > > class better_list (list):
> > > tail = property(None, list.append)
> >
> > This is an impressive, spiffy little class.
>
> Yes, nice use of property.
>
&
away and gives me what I want... no
>>Computer Sciencey > to deal with :)
>
>
> A can be turned back into a string:
> >>> st = '0123456789'
> >>> reversed(st)
>
> >>> ''.join( reversed(st) )
> '98765432
but I don't want to. I want it to
> stay exactly the same, but I want to start at the end and end at the
> beginning.
>
> Thanks!
>
> - Dave
>
for i in reversed(ls):
do_stuff()
reversed doesn't reverse the list. It returns an iterator that iterates
throu
; that's not nearly as gruesome enough a name to go with the special
> lopsided Pythonic creature mentioned above. I suggest we name it a
> hurgledink.
>
So, ahhh, what about zero-tuples? zuple? uple? Surely it would be better
for 2,1, and 0-tuples to be called 2,1, and 0-tuples.
And, BTW, in New Zealand, I've only ever heard the pronunciation
'tupple'. toople sounds kind-of stoopid.
Cheers,
Carl.
--
http://mail.python.org/mailman/listinfo/python-list
it. To wit:
>>> Parrot.f is Parrot.f
False
>>> Parrot.__dict__ is Parrot.__dict__
False
But wait, it gets weirder.
>>> id(Parrot.f) == id(Parrot.f)
True
>>> id(Parrot.__dict__) == id(Parrot.__dict__)
True
But that's not all. Redefine Parrot as:
class Parrot(object):
def f(self): pass
def g(self): pass
Then,
>>> id(Parrot.f) == id(Parrot.g)
True
your-milage-may-vary-ly yr's,
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
t.
> This usually leads to
> having each class follow the Singleton pattern, further complicating
> the design.
Meh. I don't feel too strongly about this, but I'd think an enum as a
class is better, because you can't (or, rather, oughtn't) compare
constants from different enums. That's a logical demarcation of
classes.
Sorry if I was a little blunt here. In the end, I really don't see the
problems that this enum addresses being all that common; it seems a lot
of work for minor benefit.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
Stefan Rank wrote:
> on 28.02.2006 07:50 Carl Banks said the following:
> > Ben Finney wrote:
> >> This PEP specifies an enumeration data type for Python.
> >
> [snip]
> >
> > Here's why I think it's not too useful to begin with: the benefits
;ve done similar things in GTK on Linux. I had a gtkglarea canvas,
PyOpenGL, and my own C extension all making OpenGL calls.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
ems to have a variable tab stop) to edit the file with
tabs, but save it with spaces.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
John Salerno wrote:
> Carl Banks wrote:
> > John Salerno wrote:
> >> So I'm wondering, how do you all handle moving around in your code in
> >> cases like this? Is there some sort of consistency to these things that
> >> you can write rules for you
1] := 10!
Out[1]= 3628800
(The more you know)
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 29, 7:36 pm, alf <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I want to develop a following lib:
>
> lib space user space
>
> A -> B -> | -> user_class
>
> however A and B are abstrac enough to have following:
>
> user_super_base_class -> | -> A -> B -> | -> user_class
>
> user space
wise idea?
Thanks
Carl D'Halluin
www.qlayer.com
--
http://mail.python.org/mailman/listinfo/python-list
using MySQLdb, I do cursor.execute("update...")
How can I tell how many rows were affected ?
Carl K
--
http://mail.python.org/mailman/listinfo/python-list
John Nagle wrote:
> Carl K wrote:
>> using MySQLdb, I do cursor.execute("update...")
>>
>> How can I tell how many rows were affected ?
>>
>> Carl K
>
> cursor = db.cursor() # get cursor
> cursor.execute(sql
Dennis Lee Bieber wrote:
> On Thu, 26 Apr 2007 18:18:57 -0700, John Nagle <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
>> Carl K wrote:
>>> using MySQLdb, I do cursor.execute("update...")
>>>
>>> How can I tell h
e.html - This just shows what
lengths I am willing to go to. but I really don't want to start learning perl.
TIA
Carl K
--
http://mail.python.org/mailman/listinfo/python-list
;, line 17, in __getitem__
def __getitem__(self, key): return self.data[key]
KeyError: 'ORACLE_HOME'
Now I don't really know whos problem this is.
Carl K
--
http://mail.python.org/mailman/listinfo/python-list
tError: libclntsh.so.10.1: cannot open shared object file: No such file or
directory
guessing I need to add
/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib/
to some path?
btw - anyone know of a .deb that will install this?
Carl K
--
http://mail.python.org/mailman/listinfo/python-list
Bill Scherer wrote:
> Carl K wrote:
>> Getting closer, thanks Bill and Diez.
>>
>> $ export ORACLE_HOME
>> $ ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client
>> $ python setup.py build
>> $ sudo python setup.py install
>>
>> $ pyt
Dennis Lee Bieber wrote:
> On Thu, 24 May 2007 09:07:07 -0500, Carl K <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
>> Getting closer, thanks Bill and Diez.
>>
>> $ export ORACLE_HOME
>> $ ORACLE_HOME=/usr/lib/oracle/xe/app/oracle
(selected value)
This is not a joke. I don't mean Python should necessarily do this
(though it could be done without any ambiguity or backward
incompatibility: there is currently nowhere in Python where two
identifiers can be separated by only a space), but new languages
should be designed
re glob.glob,
select.select, or time.time. It's ugly and potentially confusing.
And if I were Polynesian I would keep thinking I was seeing plurals.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
if obj is not None:
obj._refcount += 1
else:
obj = super(CachedResourceMetaclass,self).__call__(*args)
obj._key = args
obj._refcount = 1
self._cache[args] = obj
return obj
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
{"A"} ||={}.
>
> Thanks,
> Geoffrey
Define b as a default dict:
b = defaultdict(dict)
b[k]['A'] = l
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
://docs.python.org/lib/typesmapping.html
>
> No, this has already been proposed and discarded. The OP does NOT
> want this, because it always generates an empty {} whether it is
> needed or not. Not really a big hardship, but if the default value
> were some expensive-to-construct c
oesn't (easily) work with common GUIs like GTK and Wx.
If you want to use use OpenGL in a GUI app, then you'll want to find
an "OpenGL canvas widget" for that GUI.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
2 Python supports timestamp checking and subprocess calling and
whatnot, but stuff like dependency trees you'll have to work out
yourself.
(BTW, if "make" is failing or annoying you, you might want to consider
SCons, which for me has been a lot more intelligent and
straight
and several others are misunderstanding the OP: the OP
wants to learn some details of Python without having to *relearn* the
basics of programming. It's a reasonable request.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
se because "data_files" wasn't too helpful, there was never
much incentive to improve it. Which (getting back to py2exe) is
unfortunate since you CAN rely on the location when using py2exe, but
it is stuck with the unwieldy usage. Oh well.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
ld have to check the error code to distinguish, and
reraise if not file not found.
# this is the point where success or failure
# determines what I do next, that's why I handle
# the exception here.
try:
load_myFile()
except IOError, e:
if e.errno == 2: # file not found is usually errno 2
print "file not found"
else:
raise
else:
# load succeeded, do whatever.
One other useful technique is recasting: catching an error close to
the call, and raising a different error.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
one of the more pleasant ones. (At
least not without a good set of slice-matching patterns handy, which I
don't know if Haskell has.)
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
y people often call Python a
good "glue" language for this reason. And when you have a good "glue"
language, formal interface guidelines aren't so important.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
current project, we're struggling with throughput even though we
use highly optimized code. Python would be completely out of the
question.
Now, control towers don't have these constraints, and system failure
is not nearly as critical, so Python is a better option there.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
out actually running the code) that the code fulfills the
> DBC conditions. I don't see any way to do that with Python
> decorators.
I don't see any way to do that in Python with built-in DBC syntax,
either. :)
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 31 Aug 2007 01:15:04 -0400, Roy Smith wrote:
> Carl Banks <[EMAIL PROTECTED]> wrote:
>> Python really isn't suitable for in-flight controls for various
>> reasons, and mission critical concerns is a minor one (systems with
>> less underlying complexity
reason why Python couldn't
be certified if it passed the tests, but it likely wouldn't pass as
easily as a compiled language. OTOH, spiffy features like design-by-
contract aren't going to improve your chances of getting FAA cert, either.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
tors,
dams, and so on? Come on.
BTW, I'm not really agreeing with Russ here. His suggestion (that
because Python is not used in highly critical systems, it is not suitable
for them) is logically flawed. And Alex's point, that Python has a good
track record of reliabilty (look at Go
On Sat, 01 Sep 2007 08:38:38 -0300, Jorge Godoy wrote:
> Carl Banks wrote:
>
>> This is starting to sound silly, people. Critical is a relative term,
>> and one project's critical may be anothers mundane. Sure a flaw in
>> your flagship product is a critical proble
On Sat, 01 Sep 2007 17:19:49 +0200, Pierre Hanser wrote:
> Carl Banks a écrit :
>>
>> This is starting to sound silly, people. Critical is a relative term,
>> and one project's critical may be anothers mundane. Sure a flaw in
>> your flagship product is a cr
ting them. The doc has not yet been written. I haven't
consulted the source code yet.
Any help in the way of examples would be appreciated.
Carl T.
--
http://mail.python.org/mailman/listinfo/python-list
;str"
were once functions. When these symbols became the names of their
respective types, they kept the lower-case spelling, and it became
convention for built-in types to be spelled lower-case.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
Are there any
> way to speed it up? It seems Python automatically created bench1.pyc. Does
> Python automatically execute the bench1.pyc to speed it up?
Yes, as others have explained.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
n community with your eye for syntax.
You're relatively new to Python, correct? If so, maybe you should give
yourself some time to see if some of Python's unconventional features
grow on you. I've found that wherever Python differs from the common
ways to do things,
e implicit line continuations everywhere between the opening
keyword and the colon".
To be honest, I've always thought this would be a nice feature to
have, but now that I've seen what kind of abominations are possible
with it, I'm not so sure.
Carl Banks
P.S. The &quo
hat would make insertion and deletion would be quite expensive.
Which might be ok for the OP, but it's often better to go with a
btree.
Which, you know, would be a reasonable candidate for collections
module.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
have kept the order separately, but what was the point? I
just whipped up a homemade ordered dict class, it worked fine, and I
didn't have to worry about keeping them synchronized.
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
rstand where the OP is coming from. I've done flight
simulations in Java where there are lot of complex calculations using
symbols. This is a typical formula (drag force calculation) that I
would NOT want to have to use self.xxx for:
FX_wind = -0.5 * rho * Vsq * Sref * (C_D_0 + C_D_alphasq*al
On Sep 12, 4:52 pm, Carl Banks <[EMAIL PROTECTED]> wrote:
> (The loops would necessarily be unwrapped in the actual
> bytecode.)
And by unwrapped, I mean unrolled.
:E3
Carl Banks
--
http://mail.python.org/mailman/listinfo/python-list
401 - 500 of 2081 matches
Mail list logo