elf to plain ASCII.
But if you split your text into a list
>>> u.split()
[u'\u8bb0\u8005', u'\u8c22\u91d1\u864e', u'\u3001']
you probably think you are back to square one. That is because Python prints
the repr() of the list items (otherwise a comma wo
Mingus Tsai wrote:
> When these three statements run, the IDLE crashes!
Is there a traceback that you can provide (cut and paste)?
Peter
--
http://mail.python.org/mailman/listinfo/python-list
never knew before) have to be disseminated
through the grass roots, so to speak. Definitely like the MS world is
not set up for real developers easily to be productive.
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
st be string or read-only buffer, not None
None seems to be the expected result of get_payload(decode=1) for multipart
parts.
> if part.get_content_maintype() == 'multipart':
> continue
Could it be that your test for multipart isn't correct? I would try
if
("dir c:", t.command)
if __name__ == "__main__":
unittest.main()
Peter
--
http://mail.python.org/mailman/listinfo/python-list
ost likely to be of help to us, if you can't retype all of it.
Also consider reporting on version numbers of things: Python,
Pyparallel, WinXP (SP2 for example?), just in case that matters.
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
e completed by the time the thread finishes
...
Are you looking, for example, for some kind of
thread.waitUntilCompletionAndReRaiseExceptions() method?
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
would be better if you posted a small amount of code that shows the problem.
Exceptions raised in threads can definitely be caught in the run()
method if the code is written correctly, so that is not in itself an issue.
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
thread.stop()# block here until the thread exits
I hope that clarifies things a little more...
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
= %s"%(input)
# file input_file.py
import test
CMD = (test.Test.PrintInput, float(2))
# file main.py
#!/usr/bin/env python
import input_file
import test
if __name__== "__main__":
print "Unit testing"
inst = test.Test()
CMD = input_file.CMD
print CMD
cmd = CMD[0]
param = CMD[1:]
cmd(inst, param) # this was the problematic line
Peter
--
http://mail.python.org/mailman/listinfo/python-list
ry over to my Pocket PC seems to make the file
work - thanks for the help! :-)
Peter
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm using the same distribution (or at least that is what I started
> with). Try using the following sitecustomize.py file:
>
>
Nope, spoke too soon! The Pocket PC seemed to be doing something and I
thought it was OK - obviously you can't just copy "lib-tk" into the Pocket
PC Python\Lib directory.
What else might I be missing?
Peter
"Peter Milliken" <[EMAIL PROTECTED]> wrote in message
perty(getMember)
... def __init__(self):
... self.a = self.b = 42
...
>>> A().member
1764
I. e. you are not trapped once you expose a simple attribute.
Peter
--
http://mail.python.org/mailman/listinfo/python-list
eption here?
I'm quite sure the problem you are trying to solve can be solved, but
you are still describing part of the solution you believe you need,
rather than explaining why you want to do this (which may let us show
you other, simpler or cleaner ways to accomplish your goals).
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
ut
often that's better anyway (decouples file management and parsing).
Another approach is to create a "mock file" object. Depending on your
needs, this can be a very simple or a very complex thing to do. I can
offer more detail/suggestions here if you need.
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
full access to formatting and
all other such features? I would assume it's reasonably well documented
and you could just generate that output directly.
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
Xah Lee wrote:
> If you think i have a point, ...
You have neither that, nor a clue.
(Newsgroups line trimmed to reduce the effects of cross-posting trolls.)
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
one raises a new exception). From what you describe,
however, it sounds like you just need to know that the exception
occurred, not the precise line of code down in TCPServer() where it was
originally raised.
I hope that helps and/or gives you some leads on a better solution.
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
(description),title="TCPServer",style=wx.OK |
> wx.ICON_ERROR)
> return
>
> Peter, thank you very much.
You're quite welcome. It's nice to be able to provide a "perfect"
answer, for a change. :-)
One suggestion about the above: "description"
early.
Assuming your input represents a C-style integer (i.e. fixed size)
rather than a Python long integer (of arbitrary length), you should be
able to use just struct.unpack('i', mybinarydata)[0] to get the result
you need...
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
Bryan wrote:
> Dave Cook wrote:
>> Cale? You mean Python has more ruffage?
>
> i think you mean "kale" not "cale". nothing like a hot bowl of tofu
> kale soup while reading the recipes in the "python cookbook".
Well, if he's going to talk about "ruffage" instead of "roughage",
perhaps he real
while they are very robust, if your own needs allow putting many
items in at the same time, or getting many items out, for example, then
perhaps you could come up with a much faster alternative based on the
primitives (e.g. Event, Condition, etc) and perhaps some wrapped data
structure ot
unning under GNOME in Mandrake GN/Linux 10.
Search Google for "python keylogger".
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
Mathias Dahl wrote:
> Peter Hansen <[EMAIL PROTECTED]> writes:
>>>How can I make it listen for a certain keypress (say, Windows-key +
>>>space) in a controlled fashion even when it is not the program having
>>>focus?
>>>
>>>I need to do this ru
, rewriting the entire Queue in C just
to avoid the Python method calls (which have high setup overhead) might
be the only real option.
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
and you've tested all areas of it, then you can chalk
the above up to a "py2exe feature".
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
ot;global" and just to access it directly from the
Application's OnInit() method.
This wiki page demonstrates:
http://wiki.wxpython.org/index.cgi/UsingCommandLineArguments
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
>>> from path import path
>>> path('.').files() # returns list of files in current dir
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
u to do the work to find out what it is on
Python2.3... I hope you can manage the effort. ;-)
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
zer
wx.App.__init__(self, *pargs, **kwargs)
def OnInit(self):
# use self.clargs here
app = Application(redirect=0, clargs=[dbfn])
or whatever... I just guessed at what you meant to do with dbfn though,
but I think the basic idea is clear enough.
-Peter
--
http://mail.python.or
[EMAIL PROTECTED] wrote:
> Is there standard library modules handling this ? currently I need to
> turn it into a long integer and do the shift and compare.
A little Googling turned up this:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440560
-Peter
--
http://mail.python.org/m
hard to prove it without
an exhaustive review of the source code. ;-)
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
point of doing "%s" % f? How is this different from just
> file = [f for f in glob.glob("*")]?
Answering narrowly, the difference is that using "%s" calls str() on the
items in the result list, while your suggestion does not. ("Why not
just use str(f) instead of the less clear '%s' % f?" would be a valid
question too though.)
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
s. They fit in a
similar place in one's mind, anyway
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
\r\n, not just with \n. Not sure this
is the solution to your specific problem though...
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
cked out repeatedly by working for companies who were incompetent at
terminating for cause (and there are _many_ such companies). (We didn't
make the same mistake and fired them reasonably quickly.)
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
Joerg Schuster wrote:
> I just want to use more than 100 capturing groups. If someone told me
> that it is very unlikely for Python to get rid of the said limitation,
> I would recode part of my program in C++ using pcre.
It is very unlikely for Python to get rid of the said limitation
? It would be very unusual to receive no error message of
any kind. If you are getting a message, please post the entire
traceback/message here, as we can only guess what's happening.
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
for
> it to run inside the python interface?
Google found the following (after I read the docs for subprocess and
learned about the "startupinfo" flag, and searched for "subprocess
startupinfo"). Does this help?
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/409002
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
g configuration works flawlessly. Release is another story
altogther. It usually crashes with a segmentation fault or access
violation (reading memory address 0). At one point it ran, but the code
seemed to be executing in the wrong order (stuff getting called before
initialization func
The effect of aligning it with the for-statement is that it is executed only
once /after/ the loop has run to completion. At that point town and latlong
are still bound to the values they were assigned in the last iteration
(with an empty datafile.txt the loop would never be executed and you would
get a NameError).
Peter
--
http://mail.python.org/mailman/listinfo/python-list
atch from .taken ... not.
import re
s = ("been .taken. it may be .left. there, "
"even if the .live coals were not. cleared")
r = re.compile(r"\.(.*?)\.")
print r.sub(r".start \1 end.", s)
Peter
--
http://mail.python.org/mailman/listinfo/python-list
Joerg Schuster wrote:
> So what?
Search in http://docs.python.org/lib/re-syntax.html for "99" and read
the following sentence carefully.
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
?
> File "xml\dom\ext\reader\__init__.pyc", line 20, in ?
> LookupError: unknown encoding: utf-8
Which version of py2exe are you using?
Does this page help?
http://starship.python.net/crew/theller/moin.cgi/EncodingsAgain
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
ltime control on a non-realtime
operating system is generally difficult or impossible, but it does
depend on how precise you need to be, and how "soft" your realtime
requirements are. My gut feeling is that you cannot achieve what you
want using Python on Windows (or Linux!), b
lobalThreadCount
> return GlobalThreadCount
Style/usage note: although as I mentioned you don't want to use "global"
variables anyway, even if you did the above line is unnecessary. You
only need to use "global" if you are going to *rebind* the global name
(i.e. assign a new value to it), not if you are merely reading the value
and returning it, as above. What you wrote would work, it's just not
needed or usual. (But, again, using a global at all is wrong anyway.)
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
x27;d like to bind them automatically
Why don't you just change the method signature to foo(self, x, y, z,
whatever, **kwargs)?
Peter
--
http://mail.python.org/mailman/listinfo/python-list
t much "fiddling" needed, as you can see, and what little "fiddling"
>>is needed is entirely encompassed by the generator...
>>
> Do I get a job at google if I find something wrong with the above? ;-)
Try it with a subst of length 1. Seems like you missed an opportunity :-)
Peter
--
http://mail.python.org/mailman/listinfo/python-list
ry and
> pollute a function's namespace with arbitrary variables. Some kind of
> bunch-like object would seem to be the most satisfactory way to go.
Using a bunch doesn't remove the necessity of an existence-test either (for
optional attributes).
Peter
--
http://mail.python.org/mailman/listinfo/python-list
;no', 'no', 'no', 'no', 'no']
Ouch. Seems like I spotted the subtle cornercase error and missed the big
one.
Peter
--
http://mail.python.org/mailman/listinfo/python-list
d?
elif name in expected_form1_kwargs and name not in kwargs:
What you wrote doesn't do what you think it does... it actually tests
for whether True or False is a key in kwargs, depending on whether "name
in expected_form1_kwargs" returns True or False.
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
David Rasmussen wrote:
> None of the solutions presented in this thread is nearly as fast as the
>
> print file("filename", "rb").read().count("\x00\x00\x01\x00")
Have you already timed Scott David Daniel's approach with a /large/
bl
David Rasmussen wrote:
> None of the solutions presented in this thread is nearly as fast as the
>
> print file("filename", "rb").read().count("\x00\x00\x01\x00")
Have you already timed Scott David Daniels' approach with a /large/
bl
> Now suppose we sort the first and use the elements' indices to preserve
> order where equal
> >>> sorted((f,i) for i,f in enumerate(first))
> [(1, 5), (1, 6), (1, 7), (1, 8), (1, 9), (2, 0), (2, 1), (2, 2), (2, 3),
> [(2, 4)]
>
> Separate out the first list elements:
> >>> [t[0] for t in sorted((f,i) for i,f in enumerate(first))]
> [1, 1, 1, 1, 1, 2, 2, 2, 2, 2]
>
> Now select from the second list, by first-element position correspondence:
> >>> [second[t[1]] for t in sorted((f,i) for i,f in enumerate(first))]
> ['E', 'D', 'C', 'B', 'A', 'J', 'I', 'H', 'G', 'F']
>
> Which did the OP really want? ;-)
I don't know, but there certainly is no subtle requirement to not provide
the key argument:
>>> import operator
>>> first = [2]*5 + [1]*5
>>> second = list(reversed("ABCDEFGHIJ"))
>>> [s for f, s in sorted(zip(first, second))]
['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J']
>>> [s for f, s in sorted(zip(first, second), key=operator.itemgetter(0))]
['E', 'D', 'C', 'B', 'A', 'J', 'I', 'H', 'G', 'F']
Peter
--
http://mail.python.org/mailman/listinfo/python-list
hon angle to your question, a mailing list or
something for InnoSetup would be a more appropriate place to ask.
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
quence 0010010 the substring 0010
> occurs twice.
Coincidentally the "always overlap" case seems the easiest to fix. It
suffices to replace the count() method with
def count_overlap(s, token):
pos = -1
n = 0
while 1:
try:
pos = s.index(token, pos+1)
except ValueError:
break
n += 1
return n
Or so I hope, without the thorough tests that are indispensable as we should
have learned by now...
Peter
--
http://mail.python.org/mailman/listinfo/python-list
On 11/1/05, Jarek Zgoda <[EMAIL PROTECTED]> wrote:
> Things didn't change, as last update to adodbapi was long time ago... I
> had no problems with stored procedures accessed using cursor's execute()
> method (i.e. execute('exec sp_someproc, param')), but I never tried to
> get any results, just c
trollism, which is anything but well-intentioned.
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
iguration
steps required, nothing but creating tables (and that's a standard step
with any SQL-like database). What environment were you using, and what
kind of issues did you encounter? (I ask because I often recommend
SQLite, but would like to temper that advice if in some cases these
David Wahler wrote:
> Also, I can't find any references for this "QImage Camera". Could you
> post some additional information?
Trying "Qimaging" instead.
--
http://mail.python.org/mailman/listinfo/python-list
? What will you do with the modules once they are imported?
Also: the second part of the question doesn't mean anything to me. What
do you mean by "conditionals, such as regexes", in the context of
importing modules?
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
the above
approach would not be "best", but I think that just goes to show that
until we know why you want this, we cannot possibly answer your question
properly.)
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
ly replace
console=["myscript.py"] with windows=["myscript.py"].'''
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
noying extra setup step.
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
y speaking, the internet is not "streamed" at all, but perhaps
you have some special meaning in mind that isn't in general use.
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
DaBeef wrote:
> I have been coding for 5 years. This is a proprietary protocol, so it
> is difficult converting. I did this in java but was just able to
> convert a stream.
What exactly did you do in Java to get the results you want?
Python's library is certainly *not* "limited" in this area,
I am new to Python and have to create an import library in C that uses
matrices.
These matrices can be one-dimensional (vectors) or two-dimensional. If I
look in the ActivePython 2.4 documentation at data structures, then I see at
least 2 posibilities to represent them: Lists and Tuples.
The d
ice wrote:
> I am a fresh here , and I have no idea of it.
> Do you have any comments?
Why do you want to write your own system? There are already lots of
blog programs written in Python which you could just use, or customize.
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
t stream", so I assumed he had something like that in mind.
And to think that if you'd just waited for the OP to explain what the
heck he meant by "the Internet stream", you'd have saved ever so much
time. ;-)
(But then, if we always did that Usenet wouldn't be any fun.)
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
ow about this instead (Python 2.4 or later):
list2 = list(reversed('123456789'))
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
> On Thu, 03 Nov 2005 16:40:43 -0500, Peter Hansen wrote:
>>Steven D'Aprano wrote:
>>
>>>On Thu, 03 Nov 2005 15:51:30 +, Grant Edwards wrote:
>>>
>>>>I've never heard of anybody using the data as source of
>&
in32 stuff or maybe ctypes using Python.)
(Of course, you might also luck out, as people often do, since there are
real Windows expert types hanging out here and they might help you out
anyway.)
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
]
if line in keys:
key = line
elif key == start:
# your code
elif key == files:
# your code
might work even better because 'your code' doesn't get to see the sections'
begin/end markers.
Peter
--
http://mail.python.org/mailman/listinfo/python-list
g.
(Note that if in addition to downloading the actual contents of the
page, you will require more sophisticated features of a real browser,
such as Javascript or Java execution, you'll need capabilities far
beyond what urllib2 can provide. And you probably don't want to go
there right now.)
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
ek, for 8 months" vastly decreases the value of those 52 hours, even
if it makes it sound much more impressive. I'm not surprised now at
what we keeping seeing here...
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
lable at http://msdn.microsoft.com/visualc/vctoolkit2003/
However I am not sure if everything will work with this stripped version.
Peter
--
http://mail.python.org/mailman/listinfo/python-list
"Jim" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>> Tuples or lists for matrix-like functionality?
>
> Use lists. Tuples are meant for small immutable sets of things that go
> together. Lists are more like arrays, and you can assign to one
> existing element if you want.
>
> On
"Robert Kern" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Peter Notebaert wrote:
>> I am new to Python and have to create an import library in C that uses
>> matrices.
>>
>> These matrices can be one-dimensional (vectors) or two-dimens
Swarna wrote:
> I am using scp in python to copy a html file on remote server, to my
> local machine. Now, i need to update this html file in my local machine
> ( by adding a new Hyperlink to the existing table od hyperlinks ) and
> copy it back (overwriting the old copy ) to the remote server.
If
ot;
b = object.__new__(B)
print "---"
A() # prints 'init B'
A.__init__(b)# prints 'init A'
print "---"
b = 42
A() # prints nothing
the "Nutshell" example should be changed to
x = C.__new__(C, 23)
if isinstance(x, C): x.__init__(23)
to comply with the current implementation (I used Python 2.4).
Peter
--
http://mail.python.org/mailman/listinfo/python-list
ing you whether the
problem is with the serial reading or with the plotting. If it's still
not plotting, you can assume you have missed a critical step in using
pylab and you should probably go back a step and make sure you can run
whatever tutorial or example code is included with pylab.
many demo screens it is in could be a challenge.)
The demo used to be included in the standard distribution but is now
separate, so maybe you missed it.
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
Swarna wrote:
> Peter Hansen wrote:
>>Swarna wrote:
>>>I am using scp in python to copy a html file on remote server, to my
>>>local machine. Now, i need to update this html file in my local machine
>>>( by adding a new Hyperlink to the existing table
On 6 Nov 2005 12:08:23 -0800, gsteff <[EMAIL PROTECTED]> wrote:
> PyGTK is just easier to code with. The api is much nicer.
That's why I think that Dabo's UI module is the best of all worlds. It
wraps wxPython, so the controls look great on any platform, but
provides a cleaner and more consisten
d takes 1-2
seconds to load (actually less than one second after the first
invocation following a fresh reboot).
Yes, 12MB is pretty heavy, but if it's taking that long to load I think
something might be wrong on your machine.
(Python 2.4, wx 2.6.1.0, py2exe 0.6.3, Win XP SP2)
-Peter
-
Bugs wrote:
> Peter Hansen wrote:
>> The wxPython program below, py2exe'd on my machine (1.6GHz Pentium M),
>> comes to only 12MB (2-3MB of which is Python itself), and takes 1-2
>> seconds to load (actually less than one second after the first
>> invocation fol
s, however, such as automated
testing (e.g. Test-Driven Development) and an agile development
methodology, it certainly does work, and very well. And definitely
still without the "mind-gnashing red tape" of Java, UML and their ilk.
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
arch?group=comp.lang.python&q=numeric+literals+underscores
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
t(a)
['a', 'b', 'c']
>>> tuple(a)
(1, 2, 3)
list-to-tuple conversion is optimized for performance -- basically a
memcopy() of the internal data. As with a similar peculiarity with
file.write() and the print statement, the problem could be shunned if
python would
[EMAIL PROTECTED] wrote:
> Just to satisfy my curiousity: Is there a way to do something like the
> reference solution I suggest above?
No. You cannot overload assignment.
Of course, for mutable objects you can use the object as the "reference" to
itself.
Peter
--
http:/
Jerzy Karczmarczuk wrote:
> Peter Otten wrote:
>> [EMAIL PROTECTED] wrote:
>>
>>
>>>Just to satisfy my curiousity: Is there a way to do something like the
>>>reference solution I suggest above?
>>
>>
>> No. You cannot overload assignm
]
shorthand[0] = 42 # if a[42]["pos"] is mutable
But the last indirection must always be given explicitly.
Peter
--
http://mail.python.org/mailman/listinfo/python-list
e
If it were my code I would omit the tolist() stuff and instead always pass
lists (or iterables) as the function's first two arguments.
Peter
--
http://mail.python.org/mailman/listinfo/python-list
gt; aliasing, where you can make a pointer to point to anything, say, the
> 176th byte of a function code?
I've never heard the expression "aliasing" for that, sorry.
> This is impossible in Python.
Of course, but I don't think this is what the OP wanted.
Peter
--
http://mail.python.org/mailman/listinfo/python-list
I use Emacs - it has cvs support and the next version (available from the
GNU CVS archives) will support svn as well.
Plus you can extend Emacs (assumes it doesn't quite do all you wish already
:-)) via a python extension module where you can write your new edit
commands in Python - see pymacs for
> The same problem is when running in a win console.
And do you see the "." printing in the console window?
What do you get if you change the code so you print the getch() value?
e.g.
if msvcrt.kbhit():
c = msvcrt.getch()
print 'key', ord(c)
Does that ever print anything?
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> I have no idea why people are so facinating with python.
Hey, I'm fascinating even without python!
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
other post "I
just try to use list/generator expression when possible" but you didn't
explain your reason for doing so. I assume you have some reason other
than arbitrary whim.)
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
port inspect
>>> inspect.classify_class_attrs(testclass)
[('__doc__', 'data', , None),
('__module
__', 'data', , '__main__'),
('a', 'data'
, , 'a')]
There are other methods in "inspect" which could help you.
-Peter
--
http://mail.python.org/mailman/listinfo/python-list
>>> class List(list):
... first = make_prp(0)
... last = make_prp(-1)
...
>>> items = List([1,2,3])
>>> items.first
1
>>> items.last = 42
>>> items
[1, 2, 42]
However, that's customizing attribute access, not name binding.
Peter
--
http://mail.python.org/mailman/listinfo/python-list
2001 - 2100 of 9340 matches
Mail list logo