"Antoon Pardon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Op 2005-01-13, Fredrik Lundh schreef <[EMAIL PROTECTED]>:
>> Antoon Pardon wrote:
>>
>>> Well, it seems that Guido is wrong then. The documentation clearly
>>> states that an expression is a statement.
>>
>> no, it says
"Paul Rubin" <"http://phr.cx"@NOSPAM.invalid> wrote in message
news:[EMAIL PROTECTED]
> Steven Bethard <[EMAIL PROTECTED]> writes:
>> Note that sorted is a builtin function, not a method of a list
>> object.
>
> Oh, same difference. I thought it was a method because I'm not using
> 2.4 yet. The
"Fuzzyman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Xah Lee wrote:
>> gmane is great!
> I guess that most people use google to post to newsgroups is that they
> don't have nntp access.
Anyone with a normal internet connection has nntp access. What some do not
get from t
"Bruno Desthuilliers" <[EMAIL PROTECTED]> wrote in
message news:[EMAIL PROTECTED]
>id(object) -> integer
>Return the identity of an object. This is guaranteed to be unique among
>simultaneously existing objects.
This is part of the language specification. Also, the identity of an
object must
"Scott David Daniels" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> franzkowiak wrote:
>> I've read some bytes from a file and just now I can't interpret 4 bytes
>> in this dates like a real value. An extract from my program:
>> def l32(c):
>> return ord(c[0]) + (ord(c[1])<<
"Erik Bethke" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I am having a great time with python and pygame, and last night I took
> a long look at the wxPython demo. I think that rocks as well.
>
> So now, my question is do wxPython and PyGame work together?
I have no personal
RE: RuntimeError: dictionary changed size during iteration
"Batista, Facundo" <[EMAIL PROTECTED]> wrote
[Robert Brewer]
#- But not unexpected, since vars() returns a dictionary, and
#- binding 'e'
#- changes that dictionary while you are iterating over it.
>For me, the point is: vars() returns th
"Francis Girard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>If I understand correctly,
Almost...
> a "generator" produce something over which you can
> iterate with the help of an "iterator".
To be exact, the producer is a generator function, a function whose body
contains
"George Sakkis" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Why does slicing a tuple returns a new tuple instead of a
> view of the existing one, given that
> tuples are immutable ? I ended up writing a custom
> ImmutableSequence class that does this, but I
> wonder why it is no
"Jacob H" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm developing an adventure game in Python
Since you are not the first, have you looked at what others have done to
save/restore? The Pygame site has code you can look at for adventure (I
believe) and other game types (I
"Roy Smith" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> In article <[EMAIL PROTECTED]>,
> Quest Master <[EMAIL PROTECTED]> wrote:
>
>> So, my question is simply this: is there an implementation of another
>> scripting language into Python?
>
> Python *is* a scripting language.
"George Sakkis" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Actually my initial motivation was not a huge tuple I had to slice many
> times. It was something much
> less extraordinarily unlikely, a recursive function with a sequence
> parameter:
>
> def foo(sequence):
># b
"mike" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> sometimes i want a list of categories, and from each i want to be able to
> access a list of its items. in this case is it considered acceptable to
> just create a list of those items and assign it as a property of their
> c
"Cameron Laird" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> The original poster wants to work in Python. That's
> fine. Several of us have suggested he further
> expose Python itself to his end-users as an extension
> language. That certainly is feasible. He needn't
> explai
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> Terry Reedy wrote:
>> In other words, if you don't really want slices copied out of the
>> sequence,
>> then don't slice! Just use 2 ints to indicate the working region or
>> view.
Davor, Before I learned Python, I too was put off by OO hype. And I
suppose I still would be if I still listened to it. But Python's class
statement is somewhere inbetween a C typedef and C++/Jave classes.
Stripped down pretty much to the essentials and only used when really
useful, it made m
"Peter Maas" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Davor schrieb:
>> so initially I was hoping this is all what Python is about, but when I
>> started looking into it it has a huge amount of additional (mainly OO)
>> stuff which makes it in my view quite bloated now.
>
>
Xah the arrogant wrote, among other things,
# one can change data inside the class
x.i = 400
# one can also add new data to the class
x.j=4
print x.j
# or even override a method
x.square = 333
# (the following line will no longer work)
# print "3 squared is:", x.square(3)
# in Python, one must
For basic builtin objects, repr(ob) generally produces a string that when
eval()ed will recreate the object. IE
eval(repr(ob) == ob # sometimes
For writing and reading class instances, pickle is the way to go.
Terry J. Reedy
--
http://mail.python.org/mailman/listinfo/python-list
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Evan Simpson wrote:
>
>> In Python 2.4 the following works:
>>
>> >>> class G(dict):
>> ... def __getitem__(self, k):
>> ... return 'K' + k
>> ...
>> >>> g = G()
>> >>> exec 'print x, y, z' in g
>> Kx Ky Kz
>> >>>
[New subject line]
In response to my response to a trollish posting...
> There isn't any doubt that these 'tutorials' are generally unwelcome and
> unhelpful. Numerous people have kindly taken the time to flag some of the
> problems. So much so that any competent google of the archives would
>
"Aggelos I. Orfanakos" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Any idea which of the following is faster?
>
> 'a/b/c/'[:-1]
> 'a/b/c/'.rstrip('/')
I find the first easier to read and mentally process. Others may have a
different answer. But perhaps you meant with the CPy
"The Flow" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Xah Lee,
>
> Do you want to be taken seriously?
> First, stop posting.
> Second, learn perl.
> Third, learn python.
Hey all, I have seen no evidence that XL even reads the responses that have
been directed thereto. The ab
"Kamilche" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I see what you're attempting to do. However, your code, if it DID run,
> would result in a method being added to the object, not the object's
> class! Modify the class itself, not the object, as follows:
>
> |class Test:
> |
"mike" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Just recently, my virus checker detected what it called a Trojan Horse
> in the py.dll file in the python22 folder. Installation is version
> 2.2.1 and I think that it came installed when I bought the PC in
> October 2002.
My
OP:
>>I find this response a bit dissappointing frankly. Open Source people
>>make such a big deal about having lots of people being able to look at
>>source code and from that discover security problems, thus making it
>>somehow making it better than proprietary source code.
OP: Did you discover
"Michael Tobis" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'd like to dynamically add a method to an instance at
> instantiation time.
No can do. A method is function that is an attribute of a class, even if
accessed via an instance. A function added to an instance as an
"Gabriel B." <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I wanted a list of all the methods of dict for example... where can i
> find it?
Lib Ref 2.3.8 Mapping Types.
Do browse chapter 2 so you know what is there.
Terry J. Reedy
--
http://mail.python.org/mailman/listinfo/
Feel free to ignore this. Some system falsely labeled this post (sent via
gmane) as possible spam. I am sending it back in the opposite direction to
see what transpires that way. Sorry for the disturbance. tjr
"Terry Reedy" <[EMAIL PROTECTED]> wrote in message
news:
"Steven Bethard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I don't know much about what pychecker does, but if it works with the
> bytecode, shouldn't it be fine for jython and IronPython? I thought the
> bytecode was part of the language spec, and what was CPython specific
"Sridhar" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> I am doing my undergrade CS course. I am in the final year, and would
> like to do my project involving Python. Our instructors require the
> project to have novel ideas. Can the c.l.p people shed light on this
> t
"Steven Bethard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> So I assume the language spec is basically the grammar and the
> Language Reference docs[1]?
Yes. The de facto governing syntax specification is the grammar file in
the source code from which the parser is generate
"jelle" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> >You could probably write your own FixedPoint function without too much
>>difficulty, with the only tricky part being for it to know when to
> stop!
>
> It would be quite interesting to have this kind of function. But
> likely
"Fuzzyman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Equally possible (or more likely !) is that I misunderstand it :
Or that you did not sufficiently test the indicated difference ;-)
> The docs for compile say that if you are creating a code object from a
> sequence of sta
"Nelson Minar" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> You're not the only one with a hard time finding the list
> documentation. It's even crazier for string docs.
To repeat the advice I gave someone asking about dict methods:
Read or at least skim thru chapter 2 of the L
"Steve Holden" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> You are modifying the list as you iterate over it. Instead, iterate over
> > a copy by using:
> for ip in ips[:]:
Or if you are only deleting items, you can iterate backwards.
You can also build a new list with only
"David Fraser" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Kurt B. Kaiser wrote:
>> Patch / Bug Summary
>> ___
>>
>> Patches : 284 open ( +4) / 2748 closed ( +1) / 3032 total ( +5)
>> Bugs: 804 open ( +1) / 4812 closed (+13) / 5616 total (+14)
>> RFE
"Ilias Lazaridis" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
If you ask too much that other people do your searching for you, answers
will dry up. But here are a couple that you might not find on google
anyway, at least not easily.
> I want to add metadata to everything with
"Ilias Lazaridis" <[EMAIL PROTECTED]> wrote in message
>> Then 'print html_doc_instance' can print the html doc corresponding to
>> the object model.
>
> I understand this procedure.
>
> I would like to use a standard way, which uses the standard metadata
> [implicit/explicit defined].
>
> Does
"Philip Smith" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Call this a C++ programmers hang-up if you like.
>
> I don't seem to be able to define multiple versions of __init__ in my
> matrix
Correct.
> class (ie to initialise either from a list of values or from 2 dimensions
"Torsten Bronger" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>> Torsten Bronger wrote:
>>
>>> keithley = GpibInstrument(14)
>>> keithley.write("*IDN?")
>>> print keithley.read()
>>> A keithley.close() would be a wart in my opinion; instead I want
>>> to hide the whol
"Sergey Dorofeev" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I can use string.unpack if string in struct uses fixed amount of bytes.
I presume you mean struct.unpack(format, string). The string len must be
known when you call, but need not be fixed across multiple calls with
"Casey Hawthorne" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> What platforms have Python Virtual Machines and what version(s) of
> Python do they support?
> In particular:
> Palm OS
> PocketPC
Try using Google (Python PocketPC, for instance) or the equivalent
TJR
--
http:/
"Grant Edwards" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'm working on it. I should have said it's trivial if you have
> access to the platforms to be supported. I've tested a fix
> that supports pickle streams generated under Win32 and glibc.
> That's using the "native" s
"Michael Barkholt" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Is there any detailed documentation on the structure of Pythons
> internals,
> besides the source code itself?
In detail, in one place, no. There are bits and pieces in the C API docs
and the Lib man chapters on
"Grant Edwards" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> The bit patterns are defined by the IEEE 754 standard. If
> there are Python-hosting platoforms that don't use IEEE 754 as
> the floating point representation, then that can be dealt with.
>
> Python has _tons_ of plat
"Uwe Mayer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have a subclassed PyQt class:
>
> class Node(object):
>def move(self, x,y): pass
>
> class CRhomb(QCanvasPolygon, Node): pass
>
> $ python
> v2.4.1
CRhomb.mro()
> [, , 'qtcanvas.QCanvasPolygonalItem'>, , 'q
"Apple Grew" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Well can anyone tell me how do I login into newsgroup using Mozilla
> 1.7.7. What should be the username? (I tried with with my e-mail address
> I subscribed with but failed to log-in). The password asked during
> log-in i
"D H" <[EMAIL PROTECTED]> wrote in message
> Roy Smith wrote:
>> Tom Anderson <[EMAIL PROTECTED]> wrote:
>>>The one thing i really do miss is method overloading by parameter
>>>type. I used this all the time in java
>> You do things like that in type-bondage languages like Java and C++
>> bec
"Tom Anderson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> sometimes in python. No, it's not really possible in a typeless language,
> and yes, there are implementations based on decorators, but frankly,
> they're awful.
Python has strongly typed objects. Only names are typel
"Xavier Décoret" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> I cannot find the way to do generic lambda functions using the lambda
> syntax in python. I am probably missing a point.
Thinking of lambda args: expression
as more or less abbreviati
"Elmo Mäntynen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
n=(100,) tuple(*n)
As posted, this gives a syntax error. What is missing?
tjr
--
http://mail.python.org/mailman/listinfo/python-list
"Mandus" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Fri, 24 Jun 2005 16:31:08 +0100 skrev Tom Anderson:
>> On Fri, 24 Jun 2005, Joseph Garvin wrote:
>> Higher-order functions like map, filter and reduce. As of Python 3000,
>> they're non-python tricks. Sigh - i guess it's time
"Terry Reedy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> "Elmo Mäntynen" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>>>>> n=(100,) tuple(*n)
>
> As posted, this gives a syntax error
"Steve Jorgensen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Note how the powerful, context-aware exec() and eval() procedures really
> help
> simplify the code.
A stylistic note: I believe that most or all of your eval/exec uses could
be done with getattr and setattr inste
"F. Petitjean" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>res = [ bb+ii*dd for bb,ii,dd in zip(b,i,d) ]
> Hoping that zip will not be deprecated.
Cease worrying. Zip was added to replace the zipping behavior of map and
the idiom map(None, a, b, ...). It simultaneously alter
"Paddy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> The OZ homepage has an example for solving the eight queens problem:
Buried in the generator test module (something like
lib/test/test_generators.py) are solutions for both 8Queens and Knight's
Tour. You might find these of
"Paddy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Sadly, its not a solution that I'm after, but a particular toolkit that
> can be used for solving that type of problem.
Presuming this is an anwer to my comment about generators... I was pointing
you more to the method used t
"A.M. Kuchling" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> For anyone who's interested: the Python wiki now contains a list of the
> PSF-mentored proposals that were accepted for Google's Summer of Code:
> http://wiki.python.org/moin/SummerOfCode
Thanks for posting this and th
"Devan L" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> With the exception of reduce(lambda x,y:x*y, sequence), reduce can be
> replaced with sum, and Guido wants to add a product function.
The update function is not at all limited to sums and products, but can be
any callable w
"Colin J. Williams" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>Isn't this where the discussion should start? There should be some
>general policy guiding the types of modules which should be in the
>standard library.
A couple of times, Guido has given his general policy as gen
"Nathan Pinno" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>Brief question for anyone who knows the answer, because I don't.
> Is there anyway to make Python calculate square roots?
Python can calculate any calculable function of the objects it has to work
with. So the answer
"Colin J. Williams" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Terry Reedy wrote:
>>
>> A couple of times, Guido has given his general policy as generally
>> useful;
>> best-of-breed, tested and accepted by the community; and backed
"Peter Decker" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>> Is it right that two Wax proposals were accepted?
>
> Or that Wax is being promoted over Dabo, which wraps wxPython just as
> elegantly in its UI tier, and which is further along (more controls
> supported) than Wax, i
"A.M. Kuchling" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Fri, 1 Jul 2005 14:22:51 -0400,
> Terry Reedy <[EMAIL PROTECTED]> wrote:
>> Thanks for posting this and thanks for coordinating the PSF effort.
>
> I did little beyond writin
"Dark Cowherd" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> We program in Delphi in our shop and are generally very happy with it.
> We are now looking at cross-platform options especially for middle
> tier and web server.
>
> I have been doing a lot of reading and testing of Pyt
"Josiah Manson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello. I am very new to Python, and have been unable to figure out how
> to check if a variable exists or not. In the following code
Python does not have variables is the sense some other languages do. It
has (typele
"tiissa" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Variables are stored in two dictionnaries: globals() (for global
> variables) and locals() (for the local ones, which are also global on
> top level).
Within a function, the local namespace is usually *not* a dictionary.
D=lo
"Michael Hoffman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I came up with a simpler testcase. Strangely, the exception occurs in
> the statement *following* the os.utime() call:
>
> >>> import os, sys
> >>> os.utime("foo_test_file", (0, float(sys.maxint+1)))
> >>> print "hi"
"Tom Anderson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I guess setslice is a lot faster than i thought.
Nope, the example is too short to be meaningful.
> How are python lists
> implemented? Presumably not as straightforward arrays, where inserting a
> bunch of items at th
"Steven Bethard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> OTOH, I fully agree with Peter Hansen: "Really, the name is such a
> trivial, unimportant part of this whole thing that it's hardly worth
> discussing."
>From a certain viewpoint, I would agree. Yet, the word 'lambda
"George Sakkis" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Still it's hard to explain why four specific python keywords - def,
> del, exec and elif - were chosen to be abbreviated,
Precedence in other languages and CS usage?
> So, who would object the full-word versions for p
"George Sakkis" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Terry Reedy" <[EMAIL PROTECTED]> wrote:
>
>> "George Sakkis" <[EMAIL PROTECTED]> wrote in message
>> news:[EMAIL PROTECTED]
>> > Still it
"jayessay" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> 1. Someone recently remarked that good Lisp macros are basically
> executable pseudo code. I think that is pretty much exactly right
> and is a pretty good "sound bite" distillation of what it is all
> about.
Several
"Antoon Pardon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I'll clarify. A lot of the time I hear arguments against
> features that boils down to.
>
> 1) I don't need it.
>
> 2) Having the feature will make my job more difficult.
>
> 3) I don't understand the merrits of the fea
The difference in readability between
func = lambda x: x**3 - 5*x
def func(x):
return x**3 - 5*x
def func(x): return x**3 - 5*x
is obviously a matter of personal vision.
The fuctional difference (and, I believe, the only difference) is that the
def form attaches the specific name 'func' t
"Pawe³ Sakowski" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Tom Anderson wrote:
> def flatten(ll):
> return reduce(lambda a, l: a.extend(l), ll, [])
>
> How would one do that as a list comp, by the way? I'm really not very
> good
> with them yet.
Not really a list-comprehensio
"Stian Søiland" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
On 2005-07-06 02:46:27, George Sakkis wrote:
>> So, who would object the full-word versions for python 3K ?
>> def -> define
>> del -> delete
>> exec -> execute
>> elif -> else if
>Objections for the "else if" might be
"George Sakkis" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Steven Bethard" <[EMAIL PROTECTED]> wrote:
>> Dict comprehensions were recently rejected:
>> http://www.python.org/peps/pep-0274.html
>> The reason, of course, is that dict comprehensions don't gain you much
>> a
"Tim Peters" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> [Donn Cave]
>> I ran into a phenomenon that seemed odd to me, while testing a
>> build of Python 2.4.1 on BeOS 5.04, on PowerPC 603e.
>>
>> test_builtin.py, for example, fails a couple of tests with errors
>> claiming that
"Steve Juranich" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Without fail, when I start talking with some of the "old-timers"
> (people who have written code in ADA or Fortran), I hear the same
> arguments that using "if" is "better" than using "try". I think that
> the argumen
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> My shot would be to test it like this on your platform like this:
>
> #!/usr/bin/env python
> import datetime, time
> t1 = datetime.datetime.now()
> for i in [str(x) for x in range(100)]:
> if int(i) == i:
> i + 1
>
"Bengt Richter" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> The binding of a class name is similar, and class decorators
> would seem natural, i.e.,
>
>@cdeco
>class Foo: pass
> for
>class Foo: pass
>Foo = cdeco(Foo)
This possibility was discussed on the py-dev
"Ron Adam" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> To avoid that you either need to define the flag string as a global name
> or use it strictly in the local scope it's defined in. Python will also
> sometimes reuse strings as an optimization instead of creating a second
>
"Ralf W. Grosse-Kunstleve" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
I have a suggestion I don't remember seeing for flagging which vars to
autoinit without new syntax: use '_' instead of '.'. I have never seen
local vars with a leading '_'. So, in combination with whatever
""Martin v. Löwis"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Right. OTOH, I notice a frequent game of Katze und Maus (cat and mouse?)
Yes, apparently with the same idiomatic meaning, as you decribe the game
here perfectly.
TJR
--
http://mail.python.org/mailman/listinfo
"George Sakkis" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> "Terry Reedy" <[EMAIL PROTECTED]> wrote:
>> This possibility was discussed on the py-dev list about a year or so
>> ago.
>> The twice monthly summaries should incl
"Dan Sommers" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Sun, 10 Jul 2005 16:26:24 -0400,
> "Terry Reedy" <[EMAIL PROTECTED]> wrote:
>> I have a suggestion I don't remember seeing for flagging which vars to
>> autoi
"Bengt Richter" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Me too. I liked the leading _, but on second thought it is a weird
> language change
> re names in a special context. Probably not so good.
To repeat: while my '_' proposal could have been for a language change (in
3
| I've been doing a lot of reading about static methods in Python,
and possibly getting over-confused by the minutia of the CPython
implementation, as well as by the misnomer. Conceptually, a 'static
method'
is a function attribute of a class that is to be used as a function and not
as a method
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> hex() of an int appears to return lowercase hex digits, and hex() of a
> long uppercase.
Already bug-reported and fixed for 2.5 (to use lowercase, I believe).
http://sourceforge.net/tracker/?group_id=5470&atid=105470
"Tom Anderson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Sat, 16 Jul 2005, Joseph Garvin wrote:
>
>> Someone correct me if I'm wrong -- but isn't this the Shortest Path
>> problem?
>
> Dang! I was just about to point that out.
One twist is that it is not the shortest path
"sj" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>I believe the type "list" is implemented as an array of pointers.
A Python list is sematically/behaviorally defined as a mutable extensible
sequence of references to Python objects. For the CPython reference
implementation, the
"Nathan Pinno" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I use input() all the time. I know many people say it ain't safe, but
> whose going to use it to crash their own comp? Only an insane person
> would,
This is usage Guido intended it for, not for production apps distri
"Bob Officer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip over 100 lines that should have been snipped before]
>>In particular I am interested in the EM dataset.
>
> There isn't any "data set"
>
> There are no "formula"...
>
> There is only EGD
>
> Crackpot.
>
> http://www
"Steven D'Aprano" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Tue, 19 Jul 2005 10:20:04 +0200, Glauco wrote:
>
>>> The only niggly worry I have is I'm not sure when hash can be used,
>>> when
>>> it is unique, or even if is it guaranteed to be unique.
>>>
>>
>> Thank Steve,
"Helge Aksdal" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>* Jaime Wyant <[EMAIL PROTECTED]> [2005/07/19 21:26]:
>
>> It sounds really strange to connect to a server "several hundred"
>> times. If I had to guess, the server monitored all of the connects
>> coming from your IP ad
"Helge Aksdal" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>* Terry Reedy <[EMAIL PROTECTED]> [2005/07/19 22:57]:
>
>> Ask your server administrator if you are bumping up against a hidden
>> connection limit. Or if a query can ask abou
> Wow, I didn't know about enumerate.
It is listed and explained in Lib Ref Manual, Chapter 2, on builtin
functions and types and their methods. Everyone should read at least that
much of the Lib manual.
Terry J. Reedy
--
http://mail.python.org/mailman/listinfo/python-list
"Reinhold Birkenfeld" <[EMAIL PROTECTED]> wrote in
message news:[EMAIL PROTECTED]
> Most prominent change is that it doesn't inherit from str/unicode
> anymore.
> I found this distinction important, because as a str subclass the Path
> object
> has many methods that don't make sense for it.
Wh
2101 - 2200 of 7511 matches
Mail list logo