From: Ben Finney
This thread is already off-topic and too long. I'm conflicted about my
role in that;
I have endeavoured only to address falsehoods that IMO were not
otherwise being addressed.
So I'll try to keep this brief.
Ethan Furman et...@stoneleaf.us writes:
This doesn't make sense
Gabriel Genellina write:
En Sun, 28 Mar 2010 21:58:07 -0300, Delaney, Timothy (Tim)
tdela...@avaya.com escribió:
Gabriel Genellina wrote:
Alan Harris-Reid aharrisr...@googlemail.com escribió:
Using Python 3.1, I sometimes use the super() function to call the
equivalent method from
Gabriel Genellina wrote:
Alan Harris-Reid aharrisr...@googlemail.com escribió:
Using Python 3.1, I sometimes use the super() function to call the
equivalent method from a parent class, for example
def mymethod(self):
super().mymethod()
some more code...
Is there any way of
Mark Dickinson wrote:
Since the 'and' and 'or' already return objects (and objects
evaluate to true or false), then 'xor' should behave likewise, IMO.
I expect that would be the case if it were ever added to the
language.
I'm not so sure. Did you ever wonder why the any() and all()
Lawrence D'Oliveiro wrote:
In message mailman.3332.1238914117.11746.python-l...@python.org,
Terry Reedy wrote:
Lawrence D'Oliveiro wrote:
All Python objects are reference-counted.
Nope. Only in CPython, and even that could change.
Why should it?
Because Guido has said it might
As someone who has to use ClearCase UCM at work (damned politics!) I can
tell you that I very much prefer creating a separate view (directory)
for each branch as I used to do in Base ClearCase.
All too often you end up having to deliver multiple activities together
because someone else made a
Sorry - it's early and I didn't force Outlook to not top-post.
Unfortunately, I get asked to top-post here at work ...
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
Rhodri James wrote:
On Thu, 26 Mar 2009 09:35:55 -, Paddy O'Loughlin
patrick.olough...@gmail.com wrote:
Because of this, I was thinking of making sure I included exceptions
and handling, the richness of the python library and a pointing out
how many modules there were out there to do
Aahz wrote:
In article 49b58b35$0$3548$426a7...@news.free.fr,
Bruno Desthuilliers bdesth.quelquech...@free.quelquepart.fr wrote:
Tomasz Rola a écrit :
I may not be objective (tried Java, hated it after 6 years).
Arf - only took me 6 months !-)
That long? It only took me six minutes.
ZikO wrote:
I am a C++ programmer and I am thinking of learning something else
because I know second language might be very helpful somehow. I have
heard a few positive things about Python but I have never writen any
single line in python so I do not know this language at all.
Do you think
Tim Chase wrote:
# swap list contents...not so much...
m,n = [1,2,3],[4,5,6]
m[:],n[:] = n,m
m,n
([4, 5, 6], [4, 5, 6])
The first two work as expected but the 3rd seems to leak some
internal abstraction. It seems to work if I force content-copying:
m[:],n[:] = n[:],m[:]
bearophileh...@lycos.com wrote:
Paul Rubin:
Gideon Smeding of the University of
Utrecht has written a masters' thesis titled An executable
operational semantics for Python.
A significant part of Computer Science is a waste of time and money.
The same can be said for any research. Can you
bearophileh...@lycos.com wrote:
I have missed another example: It may be possible to create a sorting
routine that's not stable but is faster than the current stable
timsort (for example in C++ STL you have both sorting routines, and
the unstable one is a variant of introsort that is faster
s...@pobox.com wrote:
We've been running SpamBayes on the news-to-mail gateway on
mail.python.org for a couple weeks now. To me it seems like the
level of spam leaking onto the list has dropped way down but I'd like
some feedback from people who read the python-list@python.org mailing
list
Terry Reedy wrote:
The compiled code differs.
I *strongly* doubt that. Properties are designed to be transparent to
user code that access atrributes through the usual dotted name
notation precisely so that class code can be changed from
x = ob
to
x = property(get_x, set_x, del_x)
Piotr Sobolewski wrote:
Hello,
I have such program:
import time
import thread
def f():
global lock
while True:
lock.acquire()
print thread.get_ident()
time.sleep(1)
lock.release()
lock=thread.allocate_lock()
thread.start_new_thread(f,())
Paulo J. Matos wrote:
Question cleared:
http://wiki.python.org/moin/DistributionUtilities
Another option that we've used in the past was to write the sensitive
bits in Pyrex/Cython. These get compiled to executable code (a .pyd/DLL
on Windows, .so on Unix-like systems). They are tied to the
Steven D'Aprano wrote:
On Thu, 04 Sep 2008 01:22:22 +0100, Alexander Schmolck wrote:
It seems to me that the right choice for thousands seperator is the
apostrophe.
You mean the character already used as a string delimiter?
Hey - I just found a new use for the backtick!
123`456`7890
Lie wrote:
Ah... now I understand what the Zen is talking about when it said:
Now is better then never, although never is often better than *right*
now. If you don't have all the necessary resources to fix an
exception right now, don't try to fix it, instead let it propagate,
and allow it to
David C. Ullrich wrote:
f: 0.0158488750458
g: 0.000610113143921
h: 0.00200295448303
f: 0.0184948444366
g: 0.000257015228271
h: 0.00116610527039
I suspect you're hitting the point of diminishing returns with g, and
any further investigations into optimisation are purely for fun and
learning
Diez B. Roggisch wrote:
For sets, I presume they are built on top of or like dicts, and
there is nothing crazy in the low level implementation so that I can
be guaranteed that if I don't alter the set, then the order,
although arbitrary, will be maintained in successive iterations over
the
Guillermo wrote:
Hi there,
Is it possible to get a 2.4 dll of python for Windows easily? I need
it to use python as scripting language for Vim.
http://www.python.org/
which leads you to:
http://www.python.org/download/
which leads you to:
http://www.python.org/download/releases/2.4.5/
Fredrik Lundh wrote:
rynt wrote:
You're either ---
A. A Troll
B. A young, immature programmer trying to show off or
C. A total idiot.
you forgot the All of the above choice.
I read it as an inclusive or.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
ssecorp wrote:
so why would you ever want mutability?
seems very counterintuitive and unreliable.
Because immutability imposes a lot of restrictions and performance
characteristics that mutable objects don't have. For example, compare
building up a list and a tuple element-by-element
Maric Michaud wrote:
Le Friday 27 June 2008 18:26:45 Christian Heimes, vous avez écrit :
Ask yourself if you are interested if f.tell() returns exactly the
same 0 object (is) or a number that is equal to 0 (==).
That said, f.tell() == 0 and f.tell() != 0 should be written
f.tell() and not
Christian Heimes wrote:
Can you provide a C implementation that compiles under VS 2008? Python
2.6 and 3.0 are using my new VS 2008 build system and we have dropped
support for 9x, ME and NT4. If you can provide us with an
implementation we *might* consider using it.
You'd have to at least
Ian Kelly wrote:
It sounds like the wasteful list creation is the biggest objection to
using a list comprehension. I'm curious what people think of this
alternative, which avoids populating the list by using a generator
expression instead (apart from the fact that this is still quadratic,
Mensanator wrote:
Ok, I agree with 101, but I wouldn't necessarily
say the others were unfortunate. You might be
surprised at how often such fixations discover
bugs, something that I have a gift for.
The discovering, the making, or both? ;)
Tim Delaney
--
George Sakkis wrote:
On Mar 31, 1:46 pm, Marc 'BlackJack' Rintsch [EMAIL PROTECTED] wrote:
More specifically, who can create a bigger mess on c.l.py? (check
one)
[ ] - Xah Lee
[X] - castironpi
Xah Lee's postings might be trolls but sometimes they spark some
really interesting and
Steven D'Aprano wrote:
On Sat, 22 Mar 2008 21:11:51 -0700, sturlamolden wrote:
Yes. And because Python is a scripting language
Python is a programming language. It can be used for scripting, but
that's not all it can do. Describing it as a scripting language is
like describing a
John Machin wrote:
On Mar 23, 12:32 am, Diez B. Roggisch [EMAIL PROTECTED] wrote:
John Machin schrieb:
On Mar 21, 11:48 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote:
[1] Just one example:http://docs.mootools.net/Class/Class.js
Mootools being something a coworker might use?
I don't
Aahz wrote:
For anyone who hasn't heard, E. Gary Gygax died yesterday. Some
people think we should build a tomb in his honor. ;-)
Well, you sure wouldn't get a saving throw there ;)
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano wrote:
Postfix, I think, interpets foo+bar the same as foo.
Gmail does the same. It's quite useful - apart from using it to
determine which site I signed up to has sent me mail, I also use it so I
can have multiple Guild Wars accounts using the same email account e.g.
me[EMAIL
Grant Edwards wrote:
On 2008-01-16, Lutz Horn [EMAIL PROTECTED] wrote:
Hi,
On Wed, 16 Jan 2008 05:29:08 -0800 (PST), [EMAIL PROTECTED]
said:
var = /home/anonymous
os.system(echo $var)
os.system(echo %s % var)
Though one wonders why one would do that instead of
You know you've been working at a large company for too long when you
see that subject and think ISO-certified Python?
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
Aahz wrote:
In article [EMAIL PROTECTED],
Chris Mellon [EMAIL PROTECTED] wrote:
You can reduce the size of new-style classes (inherit from object) by
quite a bit if you use __slots__ to eliminate the class dictionary.
You can also reduce your functionality quite a bit by using __slots__.
Aahz wrote:
Unless it's a new style class with __slots__
[]
Naw, I'll skip the rant this time. ;-)
Wuss! I was looking forward to it :)
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
From: Grant Edwards
Anyway, I apologize for my attempt at humor, since it appears
to have somehow offended.
Why apologize? If someone doesn't like the name given to a piece of
software by its author(s), screw them. If I find the software useful,
I'll use it.
Licheng Fang wrote:
This is enlightening. Surely I shouldn't have worried too much about
performance before doing some measurement.
And with that statement you have truly achieved enlightenment.
Or to put it another way ... performance tuning without profiling is a
waste of time.
Tim Delaney
[EMAIL PROTECTED] wrote:
ANNOUNCE:
NUCULAR fielded text searchable indexing
Does NUCULAR stand for anything? The (apparent) misspelling of
nuclear has already turned me off wanting to find out more about it.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
TheFlyingDutchman wrote:
On Sep 28, 1:09 pm, Steve Holden [EMAIL PROTECTED] wrote:
That's because the tutor list doesn't offer a newsgroup. He was
probably just trying to get rid of you.
Now at 98.75% ...
Not sure if that's the reading on your trollmeter or on the meter that
measures
ZeD wrote:
thebjorn wrote:
int(020)
20
020
16
You can get the latter behavior using eval:
why using eval when int has the base optional parameter?
int(020)
20
int(020, 8)
16
int(09, 8)
Traceback (most recent call last):
File stdin, line 1, in module
ValueError: invalid
Hrvoje Niksic wrote:
Delaney, Timothy (Tim) [EMAIL PROTECTED] writes:
Yep - appears I must have been misremembering from another language
(dunno which)
coughTcl/cough
Not bloody likely - only used Tcl for expect, and then only very
minimally. I'm sure there's at least one language though
Carsten Haese wrote:
Where the heck does *this* come from? Neither Python 2.5.1 nor the
3.0alpha has this in `__builtin__`.
It comes from the 'new' module:
import new
help(new.function)
Help on class function in module __builtin__:
...
Oddly enough, the help misrepresents which
Always be careful with int() incase any of the values have a leading
zero - check the documentation for int() carefully.
Cheers,
Tim Delaney
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Robert Rawlins - Think Blue
Sent: Monday, 24 September
Carsten Haese wrote:
That interpreter session is a work of fiction, since sorted returns
the sorted list instead of sorting the list in place. Also, it's
better (i.e. more readable and likely faster) to use a sort key
function instead of a comparison function whenever possible. In this
case,
Carsten Haese wrote:
On Mon, 2007-09-24 at 19:48 +0800, Delaney, Timothy (Tim) wrote:
Always be careful with int() incase any of the values have a leading
zero - check the documentation for int() carefully.
Why would leading zeroes be a problem?
int(10)
10
int(010)
10
int(0010)
10
Delaney, Timothy (Tim) wrote:
Nope - pretty sure that an earlier version of Python defaulted to a
radix of 0, but it appears to default to a radix of 10 in Python 2.5.
In any case, I've submitted a bug report and suggested new text for
the documentation of int() to make it clear what
Carsten Haese wrote:
On Mon, 2007-09-24 at 19:58 +0800, Delaney, Timothy (Tim) wrote:
I'm sure that in some version of Python it would have given a
ValueError (due to the default radix being 0) but it appears to have
changed to a default radix of 10 somewhere along the way.
Not even Python
Python Maniac wrote:
Some benchmarks showing the effectiveness of using Psyco:
scramble: 4.210
scramble_listcomp: 2.343
scramble_gencomp: 2.599
scramble_map: 1.960
scramble_imap: 2.231
scramble_dict: 2.387
scramble_dict_map: 0.535
scramble_dict_imap: 0.726
Ben Finney wrote:
The latter two statements are equivalent. The 'instance.method(args)'
syntax is just sugar for 'Class.method(instance, args)'.
Only in the case that instance is an instance of Class, and not an
instance of a subclass of Class. For example, the following are not
equivalent:
Hrvoje Niksic wrote:
Dr Mephesto [EMAIL PROTECTED] writes:
I would like to create a pretty big list of lists; a list 3,000,000
long, each entry containing 5 empty lists. My application will
append data each of the 5 sublists, so they will be of varying
lengths (so no arrays!).
Does
Alex Martelli wrote:
rfv-370 [EMAIL PROTECTED] wrote:
have made the following small test:
Before starting my test my UsedPhysicalMemory(PF): 555Mb
tf=range(0,1000)PF: 710Mb ( so 155Mb for my List)
tf=[0,1,2,3,4,5] PF: 672Mb (Why? Why the remaining
117Mb is not
[EMAIL PROTECTED] wrote:
I'm using Jython in combination with Java, webservices and jboss4.0.4.
The webservice is implemented in java and creates an PythonInterpreter
object which loads the jython scripts.
I wrote an jython script which uses a function from another jython
file called
John Nagle wrote:
One can argue over tab vs. space indentation, but mixing the two
is just wrong. Why not have CPython report an error if a file has
both leading tabs and leading spaces? I know that was proposed at
some point, but I don't think it ever went in. That would catch a
common
Ben Finney wrote:
If your MUA is not using the information, provided in every message
from the mailing list, to do what you want, don't ask mailing list
admmministrators to accomodate your broken MUA.
There would be nothing wrong with an MUA for example, having a reply
button where the user
Adam Atlas wrote:
I have a program that seemed to be leaking memory, but after
debugging, it seemed it just wasn't getting around to collecting the
objects in question often enough. The objects are very long-lived, so
they probably end up in generation 2, and don't get collected for a
long
acprkit wrote:
Hi
I have an ibm thinkpad x23, and shut it down about an hour ago. When I
went to
reboot , all the lights come on then they go off and only the light
with the z in a circle stays on. The screen stays blank and the hard
drive spins. Could I have deleated the bios when I
Dustin MacDonald wrote:
[code]
randomizing_counter = 0
# Put the loop counter for the randomizing to zero.
until_val = 36
# Set the until val to 36. We'll compare them to make sure we're not
at the end of our wordlist_both.
while randomizing_counter until_val:
big_randomized_int
Steve Howell wrote:
I think Gabriel was making the point that the *input*
to sorted() cannot be a generator, even thought
sorted() itself could in theory be a generator with
the right underlying implementation (e.g. heapsort).
Actually, the input to sorted() can be any iterable - sorted puts
Terry Reedy wrote:
Dan Bishop [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
If you don't need the list to be sorted until you're done building
it, you can just use:
lst = sorted(set(lst))
?? looks same as
lst.sort()
You missed that the OP wants only unique values from the
Josh Ritter wrote:
A number of our Windows customers have an issue with the sqlite3
module included with Python 2.5.1
We've tracked the problem down to the sqlite3.dll included with the
Python
2.5.1 distrubtion. It is stripped and thus cannot be relocated. This
causes the following
Delaney, Timothy (Tim) wrote:
Josh Ritter wrote:
A number of our Windows customers have an issue with the sqlite3
module included with Python 2.5.1
We've tracked the problem down to the sqlite3.dll included with the
Python
2.5.1 distrubtion. It is stripped and thus cannot be relocated
Duncan Booth wrote:
Hamilton, William [EMAIL PROTECTED] wrote:
No, they'll work just fine. They just won't work with Python 3.
It's not like the Python Liberation Front is going to hack into your
computer in the middle of the night and delete you 2.x installation.
Is that a
Carsten Haese wrote:
assert current_player in p
opponents = tuple(x for x in p if x is not current_player)
That would perform better as:
opponents = tuple(x for x in p if x is not current_player)
assert opponents
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
Bruno Desthuilliers wrote:
I came to this conclusion from my own experience, and it seems that
quite a few other programmers (most of them either better and/or more
experimented than me) came to the same conclusion. But feel free to
Been more experimented on, or have experimented more on
Alex Martelli wrote:
As others have mentioned, your particular instance is probably
evidence that you need to restructure your code a little bit, but I
do agree that x = y; if x: ... is a common enough idiom that it
warrants a shortcut. And reusing as, I think, is nice and readable,
and it's
Antoon Pardon wrote:
People are often enough not very exact in their communication and
that goes double for people who are new in a particular subject.
So I think it is entirely appropiate to think about the real question
the person is strugling with that hides between the question
actually
Your father was a hamster, and your mother smelled of elderberry.
Oh - unit testing. wink
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
Alan Franzoni wrote:
Yeah, that's right, it could have semantic differences, but that
shouldn't be the case anyway. I mean, if I don't define an __iadd__
method, writing
a += n
or
a = a + n
is just the same, right?
So, if I bother to define an __iadd__ method, I should make
Alan Franzoni wrote:
self.scriptcount = self.scriptcount + 1 = self.scriptcount += 1
the += operator is syntactic sugar just to save time... if one
doesn't use it I don't think it's a matter of beauty.
This change can have semantic differences, and so should not be done for
anything except
Daniel Nogradi wrote:
Something funny:
The new programming model of NVIDIA GPU's is called CUDA and I've
noticed that they use the same __special__ notation for certain
things as does python. For instance their modified C language has
identifiers such as __device__, __global__, __shared__,
[EMAIL PROTECTED] wrote:
All,
It works great now. Thank you for all of your incredibly quick
replies.
Rob
You should have a read of these:
http://wiki.python.org/moin/BeginnersGuide
http://effbot.org/zone/python-objects.htm
Cheers,
Tim Delaney
--
John Nagle wrote:
weakref.proxy() probably should work that way.
Weakref proxies are supposed to be transparent, but they're not
quite transparent enough.
Submit a patch to SourceForge. Please don't use tabs in email/usenet
postings - use 4-space indents. return is not a function, and
[EMAIL PROTECTED] wrote:
I don't know to which forum should I post the message
I hope someone related to the Python kernel development will read
consider the idea
It has been considered and rejected.
http://www.python.org/doc/faq/general/#why-are-colons-required-for-the-i
Nick Craig-Wood wrote:
Which appears to support my point, x (and a for that matter) are the
same for both methods wheter you do x = x + a or x += a.
The mechanism is different certainly, but the result should be the
same otherwise you are breaking the basic rules of arithmetic the
Nick Craig-Wood wrote:
x += a
does not equal
x = x + a
which it really should for all types of x and a
Actually, this will *never* be the case for classes that do in-place
augmented assignment.
a = [1]
b = [2]
c = a + b
print a, b, c
a += b
print a,
Steven D'Aprano wrote:
This is an example of overloading:
class Cheese(object):
def flavour(self):
return tasty and scrumptious
def colour(self):
return yellow
Now we define a sub-class which overloads some methods:
class BlueVein(Cheese):
def
John Machin wrote:
agent-s wrote:
btw Steven you are so witty I hope to one day pwn noobs on newsgroups
too.
Wit has nothing to do with it. The fact that you are a Python noob is
also irrelevant. Your problem statement was unintelligible, as is your
response. What does pwn mean?
Or to put
Colin J. Williams wrote:
Yes, I agree. The ternary operator is a step forward.
That's still debateable ;)
Pro: It puts paid to the python doesn't have a ternary operator and
and/or abuse.
Con: It shouldn't ever be used.
Cheers,
Tim Delaney
--
Hendrik van Rooyen wrote:
naaah - you don't have to worry - for real control He uses assembler.
with jump statements.
so the loops are closed.
Unfortunately its not open source. Yet.
People are working hard on reverse-engineering it though. I hope no one
slaps them with a DMCA-style
Grant Edwards wrote:
When I try to run pycadia
http://www.anti-particle.com/old/pycadia.shtml
I get the following error message as soon as I click start game
*** glibc detected *** python: double free or corruption (out):
0xbff43b10 ***
Then the program locks up and has to be killed
vertigo wrote:
Hello
What library/functions/classes could i use to create trees ?
I would suggest either a horticultural or religious class. I'm sure that
any library will contain functional texts on both.
Or you could just read the following:
Ken Tilton wrote:
But this is not a case where a function can't handle the job.
Is, too.
And Ken moves one step closer towards Python ...
http://www.google.com.au/search?q=monty+python+argument+sketch
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
Hendrik why? - the main point is actually that the code worked,
and was Hendrik stable - that should make you proud, not
embarrassed. that Hendrik there is far too much emphasis on
doing things the quickest way Hendrik - as long as it works, and
sam wrote:
so far so good, but i was using 'for i in the range(iterations):' a
for loop over each slice of time, where the number of iterations was
getting into the tens of millions. up until about 125,000,000 it
worked, then i got a MemoryError.
Your analysis was correct - range() returns a
John Machin wrote:
Michael Press wrote:
I have not written python codes nor run any. I saw this
code posted and decided to try it. It fails. I read the
tutorial and the entry for the built in function sum,
but still do not see the problem. The code was cut and
paste.
I doubt it -- none
Éric Daigneault wrote:
This being said after a bit of experience in programming, design
patterns and other marvels of the modern brains, doing bad code in
python requires a conscious effort to do. The bright side is that it
gives all the justification to reviewers to smack the offenders
George Sakkis wrote:
What makes the problem worse is that it's not deterministic; I can
restart it from (a little before) the point of crash and it doesn't
happen again at the same point, but it might happen further down. Now,
I wouldn't mind restarting it manually every time since the
Carsten Haese wrote:
The current documentation states that Starting with Python 2.3, the
sort() method is guaranteed to be stable. However, it's not clear
whether this specifies language behavior that all implementations must
adhere to, or whether it simply documents an implementation detail
Fredrik Lundh wrote:
Delaney, Timothy (Tim) wrote:
This is a requirement for all implementations claiming to be 2.3 or
higher.
the language reference only guarantees this for CPython:
The C implementation of Python 2.3 introduced a stable
sort() method, but code that intends
Cameron Walsh wrote:
Hi,
I have two lists, A and B, such that B is a subset of A.
I wish to sort A such that the elements in B are at the beginning of
A, and keep the existing order otherwise, i.e. stable sort. The
order of elements in B will always be correct.
for example:
A =
Paul Rubin wrote:
Anyone got any suggestions? How do you deal with this? It could be
mitigated with a faster computer (I'm using a 1.2 ghz Pentium M) but
the overall task isn't large enough to justify going out and buying
one. Anyway, I did the same build on a 2 ghz Athlon 64 and was
walterbyrd wrote:
If so, I doubt there are many.
I wonder why that is?
Well, I'm not qualified to analyse the reasons for your doubts, but I'd
guess it's because you have preconceived notions.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
Steve Holden wrote:
Given that many people distribute (enough of) the interpreter with
their Python programs I wouldn't like the above to be regarded as a
blanket statement that the Python license doesn't have to be
considered when distributing the interpreter with program source.
In
Antoon Pardon wrote:
This is just an idea of mine, nothing I expect python to adapt.
But just suppose the language allowed for words in bold. A word
in bold would be considered a reserved word, a word in non bold
would be an identifier.
Exactly how am I supposed to use my text editor to make
Andreas Huesgen wrote:
In c++, it is possible to write a locking system similar to the one
below:
void myFunction()
{
# create a resource lock. Locks some resource
ResourceLock myLock;
# the following line may throw an exception
doStuff();
}
RIIA -
Bruno Desthuilliers wrote:
What I wonder here is why __iter__ has been added to lists and tuples
but not to strings (not that I'm complaining, it's just curiousity...)
Because someone got around to doing it.
Tim Delaney
--
http://mail.python.org/mailman/listinfo/python-list
Carl Banks wrote:
Delaney, Timothy (Tim) wrote:
Steve Lianoglou wrote:
So, for instance, you can write:
my_list = eval('[1,2,3,4]')
This is just asking for trouble.
my_list = eval('import shutil; shutil.rmtree('/')')
Fortunately, that won't work because eval expects an expression
Steve Lianoglou wrote:
One thing you could do is use the eval or compile methods. These
functions let you run arbitray code passed into them as a string.
So, for instance, you can write:
my_list = eval('[1,2,3,4]')
This is just asking for trouble.
my_list = eval('import shutil;
1 - 100 of 196 matches
Mail list logo