According the Bug 36834 of gcc, there is a mis-matching between mingw
and MSVC when a struct was returned by value from a C function.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36834
Should ctypes handle this situation automatically somehow?
A ctypes discussion on 2009:
http://thread
I'm desperately trying to declare an adjacency list table with
declarative_base() but I can't figure it out. Strangely, all the
documentation avoids declarative_base() like the plague and does everything
the hard way. What the hell is this thing for if we're not supposed to use
it?
If
contests.
>
> Criticism of a language is a pissing contest?
>
> Yeah, okay, I was a tad dismissive. I un-apologetically jump to strong
> impressions about languages based on minimal use -- but I'm also willing
> to change my mind. Ruby certainly looks to me like it has some ni
Hello all
My name is agiz.im student from indonesia.im stay in borneo island.
Hmm.
im instal python version 3 and Im try file schemafuzz.py this file created by
darkc0de.
And my question.how to load file schemafuzz.py in vista?
after try to load file with commanD
Python schemafuzz.py
but my vista
I'm confused by this behaviour:
import re
regex = re.compile('foo')
match = regex.match('whatfooever')
In my experience with regular expressions, regex should have found a
match. However, in this case regex.match() returns None. Why is that?
What am I missing?
Thank you...
-
ks like the MySQLdb version doesn't match the _mysql version. If
these were two different libraries, I might understand how this error
happened. However, they're part of the same library. _mysql is just a
Python binding to the MySQL C API and MySQLdb is just a Python wrapper
arou
I'm excited to use Python 3.0 (foolishly, it's the only Python
interpreter I have on my system) but there are no libraries for it beyond
the kitchen sink. Personally, a good start would be Beautiful Soup and
Mechanize. I could also use DB.
Has there been any word on Beautiful Soup?
Hi All,
I'm switching to python from perl, and like the language a ton, but I
find pdb and pydb to be vastly inferior debuggers to the perl version.
In particular, I've grown very used to stepping into arbitrary
functions interactively. For instance, in perl you can do this:
casqa1:~> perl -de
I'm looking for a linked list implementation. Something iterable with
constant time insertion anywhere in the list. I was wondering if deque() is
the class to use or if there's something else. Is there?
Thank you...
--
http://mail.python.org/mailman/listinfo/python-list
xpects and iterable.
I'm pretty sure this something else doesn't need a list, either, and just
wants to iterate over elements.
Now, I could just make a list, using a list comprehension, performing my
operation on each element, and then pass that list on, knowing that it is
iterable. Howe
"Paul Hankin" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Nov 27, 3:48 pm, "Just Another Victim of the Ambient Morality"
> <[EMAIL PROTECTED]> wrote:
>> This won't compile for me:
>>
>> regex = re.compile(
This won't compile for me:
regex = re.compile('(.*\\).*')
I get the error:
sre_constants.error: unbalanced parenthesis
I'm running Python 2.5 on WinXP. I've tried this expression with
another RE engine in another language and it works just fine which
I've done a google search on this but, amazingly, I'm the first guy to
ever need this! Everyone else seems to need the reverse of this. Actually,
I did find some people who complained about this and rolled their own
solution but I refuse to believe that Python doesn't have a built-in
solu
"Lew" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> just bob wrote:
>> "John Bean" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PROTECTED]
>>> On Wed, 14 Nov 2007 11:04:35 -0800, "just bob"
>>&
"John Bean" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Wed, 14 Nov 2007 11:04:35 -0800, "just bob"
> <[EMAIL PROTECTED]> wrote:
>
>>
>
> Your SPAM appears to be non-existent. Vapourware. Not real.
>
> Shame, I
--
http://mail.python.org/mailman/listinfo/python-list
"Chris Mellon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Nov 7, 2007 5:15 PM, Just Another Victim of the Ambient Morality
> <[EMAIL PROTECTED]> wrote:
>>
>> "Chris Mellon" <[EMAIL PROTECTED]> wrote in message
>
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Wed, 07 Nov 2007 21:15:50 +, Just Another Victim of the Ambient
> Morality wrote:
>
>> Why can't I find a pyparsing-esque library with this implementation?
>>
"Chris Mellon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Nov 7, 2007 3:15 PM, Just Another Victim of the Ambient Morality
> <[EMAIL PROTECTED]> wrote:
>
>> > In short, it hasn't really evovled into a user-friendly package
&g
"Neil Cerutti" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 2007-11-07, Just Another Victim of the Ambient Morality
> <[EMAIL PROTECTED]> wrote:
>> "Neil Cerutti" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PRO
"Neil Cerutti" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 2007-11-05, Just Another Victim of the Ambient Morality
> <[EMAIL PROTECTED]> wrote:
>> "Kay Schluehr" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PRO
How do you change certain elements in a list? I'm looking to do the
Python equivalent of this Ruby code:
-> first = [1, 2]
=> [1, 2]
-> second = first
=> [1, 2]
-> first.map! {|i| i + 1}
=> [2, 3]
-> first
=> [2, 3]
-> second
=> [2, 3]
I need to change a list, in place, so o
"Neil Cerutti" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 2007-11-05, Just Another Victim of the Ambient Morality
> <[EMAIL PROTECTED]> wrote:
>>
>> "Kay Schluehr" <[EMAIL PROTECTED]> wrote in message
>> news:
"Kay Schluehr" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Nov 4, 10:44 pm, "Just Another Victim of the Ambient Morality"
> <[EMAIL PROTECTED]>
>
>> I believe there is a cure and it's called recursive descent parsing.
>
"Neil Cerutti" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 2007-11-04, Just Another Victim of the Ambient Morality
> <[EMAIL PROTECTED]> wrote:
>> "Neil Cerutti" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PR
"Neil Cerutti" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 2007-11-04, Just Another Victim of the Ambient Morality
> <[EMAIL PROTECTED]> wrote:
>>> Consider writing a recursive decent parser by hand to parse
>>> the l
"Neil Cerutti" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 2007-11-04, Just Another Victim of the Ambient Morality
> <[EMAIL PROTECTED]> wrote:
>>
>> "Neil Cerutti" <[EMAIL PROTECTED]> wrote in message
>> n
"Neil Cerutti" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 2007-11-03, Paul McGuire <[EMAIL PROTECTED]> wrote:
>> On Nov 3, 12:33 am, "Just Another Victim of the Ambient Morality"
>><[EMAIL PROTECTED]> wrote:
>>>
"Paul McGuire" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Nov 3, 12:33 am, "Just Another Victim of the Ambient Morality"
> <[EMAIL PROTECTED]> wrote:
>> It has recursion in it but that's not sufficient to call it a
>
y for "Recursive Descent Parser" describes this
> parser model as a "predictive parser", and later goes on to say that
> some (uncited) authors equate "predictive parser" with "recursive
> descent parsers". The article makes a special distinction fo
"Grant Edwards" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On 2007-10-30, Just Another Victim of the Ambient Morality
> <[EMAIL PROTECTED]> wrote:
>
>> Is there a Python library to communicate with a usenet server?
>
> Which protoc
Is pyparsing really a recursive descent parser? I ask this because
there are grammars it can't parse that my recursive descent parser would
parse, should I have written one. For instance:
from pyparsing import *
grammar = OneOrMore(Word(alphas)) + Literal('end')
grammar.parseString('Firs
Is there a Python library to communicate with a usenet server? I did a
bit of googling and found some sites that suggest that you can roll your own
fairly easily but, mostly, I got a lot of false positives with talk of
Python libraries on usenet and I am really hoping this work has already
"Paul McGuire" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Oct 22, 4:18 am, "Just Another Victim of the Ambient Morality"
> <[EMAIL PROTECTED]> wrote:
>> I'm trying to parse with pyparsing but the grammar I'm usin
I'm trying to parse with pyparsing but the grammar I'm using is somewhat
unorthodox. I need to be able to parse something like the following:
UPPER CASE WORDS And Title Like Words
...into two sentences:
UPPER CASE WORDS
And Title Like Words
I'm finding this surprisingly hard to do
"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 w
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.
I can't seem to get VideoCapture (http://videocapture.sourceforge.net/)
to work with my version of Python (2.5). Why is that? I've followed the
instructions which made it look easy but, as it happens all too often, it
simply doesn't work. The error I get is that the .py interface file can
I need a red-black tree in Python and I was wondering if there was one
built in or if there's a good implementation out there. Something that,
lets face it, does whatever the C++ std::map<> allows you to do...
Thank you...
--
http://mail.python.org/mailman/listinfo/python-list
"Just Another Victim of the Ambient Morality" <[EMAIL PROTECTED]> wrote
in message news:[EMAIL PROTECTED]
>
>Okay, I think I found what I'm looking for in HTMLParser in the
> HTMLParser module.
Except it appears to be buggy or, at least, not very robust.
"Just Another Victim of the Ambient Morality" <[EMAIL PROTECTED]> wrote
in message news:[EMAIL PROTECTED]
>I'm trying to parse HTML in a very generic way.
>So far, I'm using SGMLParser in the sgmllib module. The problem is
> that it forces you to pars
I'm trying to parse HTML in a very generic way.
So far, I'm using SGMLParser in the sgmllib module. The problem is that
it forces you to parse very specific tags through object methods like
start_a(), start_p() and the like, forcing you to know exactly which tags
you want to handle. I
In article <[EMAIL PROTECTED]>,
"Ant" <[EMAIL PROTECTED]> wrote:
> Ant wrote:
> > Look at the following minimal example:
> ... (snip example that shows non-capturing group capturing)
>
> Note I get the same results from python versions 2.4 and 2.5.
I think we had that discussion before, but that's not what nested
functions are for (in Python). Use modules for that. Also solves your
doctest problem nicely.
Just
--
http://mail.python.org/mailman/listinfo/python-list
t_exception and print_tb.
>From C, PyErr_Print() is often handy (if only for debugging).
Just
--
http://mail.python.org/mailman/listinfo/python-list
As I am reading Python source in this text and checking
> identation this is a bit annoying :-)
>
> How can I stop this happening? Doesn't look like an option from the
> documents. Do I have to use a regexp (scary unchartered stuff for
> me...)?
>>> "a\nb\nc\n&qu
In article <[EMAIL PROTECTED]>,
Erik Max Francis <[EMAIL PROTECTED]> wrote:
> Thorsten Kampe wrote:
>
> > I think I have a deja-vu... Did someone say "Xah"?!
>
> With a hint of Brandon.
And a slice of Timothy Rue.
Just
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
"Terry Reedy" <[EMAIL PROTECTED]> wrote:
> "Mel Wilson" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Point of information, would this be the interpreter putting
> > the result of its last calculation in _ ?
>
> Yes, [ ... ]
No, actually. It'
a newline:
>>> import md5
>>> test = md5.new("marius\n")
>>> print test.hexdigest()
0f0f60ac801a9eec2163083a22307deb
Just
--
http://mail.python.org/mailman/listinfo/python-list
q = r = s = t = u = v = 0
Just
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
Coming away from the luxury of the delphi IDE has been something of a
shock.
As a consequence I've become aware that maybe I need to spend some
money on a python IDE.
As a beginner I reckon integrated debugging would be helpful.
Does anyone have any advice or suggestions? So far I've glance
do from
> >> there. I don't know what it means to distribute a file bytewise, but if
> >> I knew exactly which modules/functions to use, I'd be more than happy
> >> reading up on them myself. I just hate not knowing where to go to begin
> >> with (even thoug
ch modules/functions to use, I'd be more than happy
> reading up on them myself. I just hate not knowing where to go to begin
> with (even though I know I probably won't know enough about images to
> use the right module properly either, but I can try).
Have a look at the url of the image, then try the next.
Just
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Kent Johnson <[EMAIL PROTECTED]> wrote:
> Robin Haswell wrote:
> > Hey guys. This should just be a quickie: I can't figure out how to convert
> > r"\x2019" to an int - could someone give me a hand please?
>
> Is thi
olve the problem at hand, at least
> there's nothing in the PEP that says it will. "import random" is an
> absolute import even in random.py is in the current directory, because
> current directory is in sys.path. Unless there's a change sys.path
> planned, the sh
In article <[EMAIL PROTECTED]>,
Jacob Kroon <[EMAIL PROTECTED]> wrote:
> I'll just reply to myself what I've found out so far:
>
> > 1. PyErr_NewException() creates the exception _class_, not the
> > instance right ?
> >
> Looks like it does
ot;Bright Side of Life"?
> >
> I think I'd prefer "The Larch"...
>
> Or just "SPAM" ( Python Modules ?)
Standard Python Archive (of) Modules?
Just
--
http://mail.python.org/mailman/listinfo/python-list
y
into a helper function, giving that function a name and sticking it into
a module can _hardly_ be called "pollution". That's what modules are
*for*.
[ ... ]
> >To me, nested functions (in Python) are *only* helpful when using closures.
> >If you're not
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> Just:
>
> > Btw. I find the use of a nested function here completely bogus: you
> > don't need the surrounding scope.
>
> I don't agree, nested functions are useful to better structure your
&
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] wrote:
> My version is similar to Just one:
>
> from random import shuffle
>
> def scramble_text(text):
> """Return the words in input text string scrambled
> except for the first and la
. """
new_text = ""
word = ""
for ch in text:
if ch.isalpha():
word += ch
else:
new_text += scramble(word)
word = ""
new_text += ch
new_text += scramble(word)
return new_text
def scramble(word):
""" scramble word """
from random import shuffle
if len(word) < 4:
return word
letters = list(word[1:-1])
shuffle(letters)
return word[0] + "".join(letters) + word[-1]
Just
--
http://mail.python.org/mailman/listinfo/python-list
nt?
Yeah, the URL:
http://www.squidoo.com/pythonology
:)
Just
--
http://mail.python.org/mailman/listinfo/python-list
Synchronized(itertools.count())
> >
> > That isn't a general solution but can be convenient (if I didn't mess
> > it up). Maybe there's a more general recipe somewhere.
>
> This code is not allowed in Python 2.4. From PEP 255:
[ snip ]
The code also doesn
ating a dict subclass that counts
> the number of assignments and deletions but that seems cumbersome (an
> bug-prone).
>
> Is there a way to get the reference count of these datadict items? I
> imagine that this would be a more stable implementation of such a feature.
>
>
em for the i686
> system where they were being cross-compiled...
.pyc files are only compatible with the same major Python version, so it
sounds like you're using different versions on both platforms.
Just
--
http://mail.python.org/mailman/listinfo/python-list
examples that used classes, and
> >> other examples that just called one thread start command - when should
> >> you use one over another?
> >
> >For simple use it doesn't matter. Use a class when you want to add more
> >state or behaviour - for example you
In article <[EMAIL PROTECTED]>,
Lin-Chieh Shangkuan <[EMAIL PROTECTED]> wrote:
> It's known that combining GTK+ or Qt with Python could enable the
> GUI design with pygtk/pyqt.
>
> In Mac OSX, it's suggested that use Cocoa be the GUI framework.
> Is the
In article <[EMAIL PROTECTED]>,
Just <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> Christoph Zwerschke <[EMAIL PROTECTED]> wrote:
>
> > Mark Dickinson wrote:
> > > Here's a variant of André's brilliant idea that's
ef func(x):
result = _cache.get(x)
if result is None:
result = x + 1 # or a time consuming calculation...
_cache[x] = result
return result
Just
--
http://mail.python.org/mailman/listinfo/python-list
printable variant without the \r:
>
> j=''.join;seven_seg=lambda x:j(j(' _ |_|_ _|
> |'[ord('^rm=3|4:s»'[int(c)])%d*2:][:3]for c in x)+"\n"for d in(3,8,7))
>
> Note that there is only one non-ascii character in the code.
Which isn't. So I'm not sure what the point is you're trying to make.
Just
--
http://mail.python.org/mailman/listinfo/python-list
ot reach python stdout.
> Is there something screwy with my environment or is there some trick to
> this that I don't know. Any help would be greatly appreciated!
Have a look at PySys_WriteStdout().
Just
--
http://mail.python.org/mailman/listinfo/python-list
directing stderr to stdout from the shell is not an
> > option for me, because I need to use stderr for other messages.
>
> smtplib obtains a copy of stderr by
>
> from sys import stderr
>
> Therefore you have to do
>
> smtplib.stderr = sys.stdout
>
> to get the desired effect.
Ouch. I'd consider this a bug. "from sys import stderr" should at least
be considered bad style.
Just
--
http://mail.python.org/mailman/listinfo/python-list
s__
type also has type as its metaclass:
>>> type.__class__
In other words, type is an instance of itself.
Just
--
http://mail.python.org/mailman/listinfo/python-list
gt;
> > d = {}
> > for i in range(len(data)):
> > d[header[i]] = data[i]
>
> But this feels kind of inelegant. So: is there a better way?
d = dict(zip(header, data))
Just
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
"pasa" <[EMAIL PROTECTED]> wrote:
> I'm an old time python user, but just got bitten by namespaces in eval.
> If this is an old discussion somewhere, feel free to point me there.
>
> Based on the documentation, I woul
In article <[EMAIL PROTECTED]>,
David Bolen <[EMAIL PROTECTED]> wrote:
> Just <[EMAIL PROTECTED]> writes:
>
> > the zipimport module has an attr called _zip_directory_cache, which is a
> > dict you can .clear(). Still, reloading modules is hairy at best, i
ul help snipped]
the zipimport module has an attr called _zip_directory_cache, which is a
dict you can .clear(). Still, reloading modules is hairy at best, its
probably easiest to relaunch your app when the .zip file has changed.
Just
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Peter Hansen <[EMAIL PROTECTED]> wrote:
> [ ... ] (Note to self: check if zip files that can
> be in sys.path can be compressed,
Yes.
> and if py2exe compresses them.)
Don't know, but I assume yes.
Just
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
BrokenClock <[EMAIL PROTECTED]> wrote:
> Here is a python newbie! I've choose it to make a pop3 proxy - I want to
> filter content between a pop3 client and a pop3 server, and I have no
> control on the server...
> First, I wanted
in-toss to a no-brainer.
The main argument was that nothing but "key in d" made sense (for
__contains__), and that therefore "for key in d" was the only option,
for symmetry with the other "in".
Just
--
http://mail.python.org/mailman/listinfo/python-list
verse of this process? For example,
> when
> I have a unicode character '£', uc.method() should return the character name
> 'POUND SIGN' in str format.
import unicodedata
name = unicodedata.name(c)
Just
--
http://mail.python.org/mailman/listinfo/python-list
at be
> a problem? Could it be that more than one process is trying to read
> Modules.zip at the same time? If so, what do we do - I don't want to have
> to include a separate version of the code for each subprocess.
>
> Any other suggestion? I need this fixed ASAP.
I
> Unfortunately it does so in an entirely new namespace, thereby losing
> the advantage of -i - namely, that you can investigate the program's
> namespace after it's terminated.
code.interact() has a namespace argument ('local'), so it really easy to
have it use the namespace you want.
Just
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
"Serge Orlov" <[EMAIL PROTECTED]> wrote:
> Svein Brekke wrote:
> > > Seriously, if you're only interested in Windows, just use py2exe,
> > > or if you want Linux+Windows, try cx_Freeze.
> >
> > Accor
ialize instances of a class derived from tuple, if it's not
> in the __init__ method?
Hi Dave,
You're going to have to override __new__. See eg.
http://groups-beta.google.com/group/comp.lang.python/browse_thread/thread
/4a53d2c69209ba76/9b21a8326d0ef002
http://mail.python.org/pipermail/tutor/2004-January/027779.html
Good luck,
Just
--
http://mail.python.org/mailman/listinfo/python-list
hat is being unpacked and what is the source.
>
> "for (one, two, three) in somelist:"
> versus
> "for one, two, three in sometlist:"
>
> Even with a colorizing editor (emacs) I find the first version
> easier to read. YMMV.
But you're using it for _
In article <[EMAIL PROTECTED]>,
"Carl Banks" <[EMAIL PROTECTED]> wrote:
> Just wrote:
> > While googling for a non-linear equation solver, I found
> > Math::Polynomial::Solve in CPAN. It seems a great little module,
> except
> > it's not
In article <[EMAIL PROTECTED]>,
"Raymond L. Buvel" <[EMAIL PROTECTED]> wrote:
> Just wrote:
>
> >
> > SciPy indeed appear to contain a solver, but I'm currently stuck in
> > trying to _get_ it for my platform (OSX). I'm definitely not g
ranslation process to python.
> >
> >Ah ok, I'll try to locate that (following the instruction in Solve.pm
> >didn't work for me :( ).
> >
>
> Ouch. I just did a quick search and found that that site has undergone
> a few changes, and the code tha
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (John M. Gamble) wrote:
> In article <[EMAIL PROTECTED]>,
> Just <[EMAIL PROTECTED]> wrote:
> >While googling for a non-linear equation solver, I found
> >Math::Polynomial::Solve in CPAN. It seems a great l
In article <[EMAIL PROTECTED]>,
Nick Coghlan <[EMAIL PROTECTED]> wrote:
> Just wrote:
> > While googling for a non-linear equation solver, I found
> > Math::Polynomial::Solve in CPAN. It seems a great little module, except
> > it's not Python... I&
ckage that implements that?
Just
--
http://mail.python.org/mailman/listinfo/python-list
ersing if iterable were huge. (and the "iterable" wouldn't be
> garbage-collected because I want to keep a reference to it)
If your list contains numbers (or lists of numbers), consider using
NumPy (Numeric) or Numarray, in which seq[::-1] will actually return a
"view"
t; - check the name exists in the local namespace, and throw an exception if it
> doesn't. If it the name does exist, perform a normal store operation.
But the compiler would _know_ in which scope the variable was defined,
no?
Just
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
Steve Holden <[EMAIL PROTECTED]> wrote:
> > If it's a path importer, it could be a cookie, specific to the importer.
> > I think in Steve's case initializing __path__ to ["*db*"] should work.
> >
> > Ju
If it's a path importer, it could be a cookie, specific to the importer.
I think in Steve's case initializing __path__ to ["*db*"] should work.
Just
--
http://mail.python.org/mailman/listinfo/python-list
*.py they have
> been compiled from.
True.
> Copying them to other path locations will give you
> the wrong __file___ information in tracebacks.
This is not 100% accurate: yes, the traceback shows the original source
file path, yet module.__file__ does point to the actual .pyc file it was
loaded from.
Just
--
http://mail.python.org/mailman/listinfo/python-list
lasses.
Heck, isinstance() even works in Python 1.5.2...
> Still, if you can use new-style classes, you should.
>
> Also, you should probably Google for "duck typing". Generally, in
> Python it is frowned upon to check the type of an object. There are
> times when it's necessary, but if you're just starting off, my guess is
> that you haven't discovered one of these times yet...
Just
--
http://mail.python.org/mailman/listinfo/python-list
s you a Python installation under /sw.
>
> But that doesn't solve his problem, which is to restore the
> Apple-supplied Python that he deleted.
Also: fink is evil. I wouldn't touch it with a ten-foot pole.
Just
--
http://mail.python.org/mailman/listinfo/python-list
In article <[EMAIL PROTECTED]>,
"Joakim Storck" <[EMAIL PROTECTED]> wrote:
> So I guess it might be a little bit less unwise to use id() instead
> then...
Why don't you use the class objects themselves as dict keys?
Just
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 117 matches
Mail list logo