Chicago Python User Group
=
Calling all Chicago Python Ninja's, this will be our best meeting yet--
this Thursday. (if not, there will be some pretty darn good pizza in
here)
Insert funny comic here: http://tinyurl.com/6b2oln
We have some interesting dragon slaying
On 12月9日, 下午2时01分, Chris Rebert [EMAIL PROTECTED] wrote:
On Mon, Dec 8, 2008 at 9:53 PM, RP [EMAIL PROTECTED] wrote:
Hello All,
This is my first REAL post(question) to Python-List. I know I can take input
from a user with raw_input()
How do I take password input in console? Any Help
Daniel Fetchinson wrote:
Hi folks,
I came across a javascript library that returns all sorts of html
codes in the cookies it sets and I need my web framework (written in
python :)) to decode them. I'm aware of htmlentitydefs but
htmlentitydefs.entitydefs.keys( ) are of the form '#xxx' but
Daniel Fetchinson wrote:
I came across a javascript library that returns all sorts of html
codes in the cookies it sets and I need my web framework (written in
python :)) to decode them. I'm aware of htmlentitydefs but
htmlentitydefs.entitydefs.keys( ) are of the form '#xxx' but this
On Mon, 08 Dec 2008 14:21:40 +, MRAB [EMAIL PROTECTED] wrote:
Jorgen Grahn wrote:
On Sat, 06 Dec 2008 10:01:10 +, Arnaud Delobelle [EMAIL PROTECTED]
wrote:
...
Why use (open, gzp.GzipFile)[Entry.endswith(.gz)] when we have had
contitional expressions for a few years now? Instead,
The MindTree project can be found and downloaded here:
http://code.google.com/p/mindtree/
I suppose it might be a python3-problem:
% /usr/local/bin/python3.0 MindTree.pyw
Traceback (most recent call last):
File MindTree.pyw, line 2, in module
from future_builtins import *
There are others but they do not support both Python and PHP. Should
I implement my own ORB, or do you know a suitable solution?
The whole purpose of an ORB ist that it is interoperable. So if you
have a good python orb (I personally prefer OmniORB), and a good one
for PHP - connect
Laszlo Nagy schrieb:
There are others but they do not support both Python and PHP. Should
I implement my own ORB, or do you know a suitable solution?
The whole purpose of an ORB ist that it is interoperable. So if you
have a good python orb (I personally prefer OmniORB), and a good one
On Dec 8, 6:43 pm, william tanksley [EMAIL PROTECTED] wrote:
On Dec 5, 6:21 pm, Daniel Fetchinson [EMAIL PROTECTED]
wrote:
I'd like this new way of defining methods, what do you guys think?
Anyone ready for writing a PEP?
snip
I see a lot of people are against it; I admit that it's not
simonh a écrit :
Thanks for the many replies. Thanks especially to Pierre. This works
perfectly:
(snip)
Ok, now for some algorithmic stuff:
def checkAge(age,min=18,max=31):
if age in list(range(min, max)):
print('Come on in!')
elif age min:
print('Sorry, too
william tanksley a écrit :
On Dec 5, 6:21 pm, Daniel Fetchinson [EMAIL PROTECTED]
wrote:
I'd like this new way of defining methods, what do you guys think?
Anyone ready for writing a PEP?
I think it's an awesome proposal. It's about time! With this change,
defining methods uses the same
On Dec 8, 9:42 pm, Senthil Kumar [EMAIL PROTECTED] wrote:
Hi Pythoneers !
Can somebody give a quick solution?
I am trying to raise exceptions in python and trying to handle it in
C.
I am able to raise exceptions successfully. However could not catch
those in C.
I am using the following
On Dec 9, 12:33 pm, Ivan Illarionov [EMAIL PROTECTED] wrote:
On Dec 8, 9:42 pm, Senthil Kumar [EMAIL PROTECTED] wrote:
Hi Pythoneers !
Can somebody give a quick solution?
I am trying to raise exceptions in python and trying to handle it in
C.
I am able to raise exceptions successfully.
Gabriel Genellina wrote:
En Mon, 08 Dec 2008 12:34:03 -0200, Cong Ma [EMAIL PROTECTED] escribió:
I'm writing a program that pickles an instance of a custom subclass of
datetime.tzinfo. I followed the guides given in the Library Reference
(version
2.5.2, chapter 5.1.6), which contain the
On 9 Dez., 11:51, Helmut Jarausch [EMAIL PROTECTED]
wrote:
Hi,
I was somewhat surprised when I ran pystones with python-2.5.2 and
with python-3.0
On my old/slow machine I get
python-2.5.2
from test import pystone
pystone.pystones()
gives (2.73, 18315.018315018315)
python-3.0
from
[EMAIL PROTECTED] wrote:
On Dec 6, 4:15 pm, Carl Banks [EMAIL PROTECTED] wrote:
[...]
This brings up another question, what would one use when referencing
method names inside the class definition?:
class C:
def self.method(arg):
self.value = arg
def
zalli,
du spills jo net mat am volley oder? mengs de du kinns dann mat mengem
auto an den MCM an eventuell op sandweiler fueren? well méindes ass
volley, densdes fussball, an mettwochs ass schon hellejen owend...
nuecht
antoine
--
http://mail.python.org/mailman/listinfo/python-list
Roy Smith [EMAIL PROTECTED] wrote:
In article [EMAIL PROTECTED],
Nick Craig-Wood [EMAIL PROTECTED] wrote:
My favourite mistake when I made the transition was calling methods
without parentheses. In perl it is common to call methods without
parentheses - in python this does
On 9 Des, 05:52, alex23 [EMAIL PROTECTED] wrote:
From my perspective, it was less the original complaint and more the
sudden jump to CPython is dead! The GIL sucks! Academic eggheads!
that prompted the comparisons to trolling.
To be fair to the complainant, before mentioning the GIL, he did
2008/12/4 Chris Mellon [EMAIL PROTECTED]:
Aside from the cultural indoctrination, though (and that may be a real
and strong force when dealing with math software, and I don't want to
discount it in general, just for purposes of this discussion) why is
it more sensible to use x here instead of
greg [EMAIL PROTECTED] wrote:
Duncan Booth wrote:
If I'm logged in to one of my servers in a large datacentre then I
don't what that system to beep as that would be pretty useless.
It also might cause the datacentre operators some consternation
when one of their servers starts mysteriously
On Tue, 09 Dec 2008 04:39:55 -0800, Paul Boddie wrote:
To be fair to the complainant, before mentioning the GIL, he did
initially get the usual trite fragments of the Zen of Python right back
at him (simple is better than complex, special cases aren't special
enough to break the rules),
Hello all,
I need to compile python myself because of a module (pivy). So I
downloaded MS Visual C++ 2008 express edition. It apparently compiled
fine but I don't know how to install it to recreate the standard
distribution. In linux i'd take make install, but on windows?
Regards,
Juan Pablo
Nick Craig-Wood [EMAIL PROTECTED] wrote:
On the other hand, leaving out the parens returns the function itself,
which you can then call later. I've often used this to create data-driven
logic.
I didn't say it wasn't useful, just that if you came from Perl like I
did, it is an easy
On 9 Des, 14:24, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
That is not what Guido said. What he actually said was:
That's possible with sufficiently powerful parser technology, but
that's not how the Python parser (and most parsers, in my experience)
treat reserved words.
simonh a écrit :
Thanks for the extra tips Ivan and Bruno. Here is how the program
looks now. Any problems?
import sys
def get_name():
name = input('Please enter your name: ')
print('Hello', name)
This one would be better spelled get_and_display_name !-)
def get_age():
the following would be nicer:
def run():
get_name()
a = get_age()
check_age(a)
again()
if __name__ == __main__:
run()
In this setup your script will only be run if it's started by itself,
but when using a import, the functions from the script can be executed
separately.
--
Helmut Jarausch wrote:
I know that processing unicode is inherently slower,
but still I was surprised that it's so much slower.
Is there any hope Python-3.0 will get faster or
is the main potential for optimizations exhausted, already?
That's not to start a flame war!
I know computers get
Steven DAprano wrote:
On Mon, 08 Dec 2008 14:24:59 +, Rasmus Fogh wrote:
For my personal problem I could indeed wrap all objects in a wrapper
with whatever 'correct' behaviour I want (thanks, TJR). It does seem a
bit much, though, just to get code like this to work as intended:
On Dec 8, 9:02 pm, simonh [EMAIL PROTECTED] wrote:
Thanks for the many replies. Thanks especially to Pierre. This works
perfectly:
snip
def getAge():
while True:
try:
age = int(input('Please enter your age: '))
return age
except ValueError:
On Dec 8, 10:34 pm, Eric [EMAIL PROTECTED] wrote:
Hello,
I am interested in participating in Google Summer of Code 2009,
hopefully for something in Python. I realize that this is way before
it begins, but I would like to start to get to know the community
better and find something that I
[EMAIL PROTECTED] wrote:
Unless you are calling reload() on the module, it will only ever get
_loaded_ once. Each additional import will just yield the existing
module. Perhaps if you post an example of the behavior that leads you
to believe that the class variables are getting reinitialized I
Steven DAprano wrote:
On Mon, 08 Dec 2008 14:24:59 +, Rasmus Fogh wrote:
snip
What might be a sensible behaviour (unlike your proposed wrapper)
Sorry
1) I was rude,
2) I thanked TJR for your wrapper class proposal in a later mail. It is
yours.
What do you dislike about my wrapper class?
On 9 Dez., 07:51, Gabriel Genellina [EMAIL PROTECTED] wrote:
En Mon, 08 Dec 2008 20:09:23 -0200, resi147 [EMAIL PROTECTED] escribió:
I'm wondering if it's really a bug since it's so trivial:
fp = open('/etc/services')
ct = fp.read(1048)
print(ct[-80:], end='')
On Dec 8, 2:24 pm, Rasmus Fogh [EMAIL PROTECTED] wrote:
So, I would much prefer a language change. I am not competent to even
propose one properly, but I'll try.
I don't see any technical problems in what you propose: as
far as I can see it's entirely feasible. However:
should. On the
Hi,
I was somewhat surprised when I ran pystones with python-2.5.2 and
with python-3.0
On my old/slow machine I get
python-2.5.2
from test import pystone
pystone.pystones()
gives (2.73, 18315.018315018315)
python-3.0
from test import pystone
pystone.pystones()
gives (4.2705,
Thanks for the extra tips Ivan and Bruno. Here is how the program
looks now. Any problems?
import sys
def get_name():
name = input('Please enter your name: ')
print('Hello', name)
def get_age():
try:
return int(input('Please enter your age: '))
except
Some of our real femme http://wesexy.byethost8.com/
--
http://mail.python.org/mailman/listinfo/python-list
Oops, sorry, this message was not intended for the group.
Apologies
Antoine De Groote wrote:
zalli,
du spills jo net mat am volley oder? mengs de du kinns dann mat mengem
auto an den MCM an eventuell op sandweiler fueren? well méindes ass
volley, densdes fussball, an mettwochs ass schon
Paul Boddie wrote:
On 9 Des, 14:24, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
That is not what Guido said. What he actually said was:
That's possible with sufficiently powerful parser technology, but
that's not how the Python parser (and most parsers, in my experience)
treat
En Tue, 09 Dec 2008 11:32:46 -0200, Juan Pablo Romero Méndez
[EMAIL PROTECTED] escribió:
I need to compile python myself because of a module (pivy). So I
downloaded MS Visual C++ 2008 express edition. It apparently compiled
fine but I don't know how to install it to recreate the standard
On Dec 6, 10:15 am, Russ P. [EMAIL PROTECTED] wrote:
On Dec 6, 4:32 am, Andreas Waldenburger [EMAIL PROTECTED] wrote:
On Sat, 6 Dec 2008 04:02:54 -0800 (PST) [EMAIL PROTECTED] wrote:
class C:
def $method(arg):
$value = arg
(Note there's no point after $, it's not
On Sun, 2008-12-07 at 11:05 +0900, Bertilo Wennergren wrote:
Aahz wrote:
In article [EMAIL PROTECTED],
Bertilo Wennergren [EMAIL PROTECTED] wrote:
I don't suppose there is any introductory material out there that is
based on Python 3000 and that is also geared at people with a
On Dec 8, 2:53 am, Ethan Furman [EMAIL PROTECTED] wrote:
Greetings All!
I nearly have support complete for dBase III dbf/dbt files -- just
wrapping up support for dates. The null value has been a hindrance for
awhile but I nearly have that solved as well.
For any who know of a cool dbf
On Dec 8, 10:27 pm, John Machin [EMAIL PROTECTED] wrote:
On Dec 9, 3:00 pm, Steven D'Aprano
[EMAIL PROTECTED] wrote:
On Mon, 08 Dec 2008 19:10:00 -0800, Robert Dailey wrote:
On Dec 8, 6:26 pm, Terry Reedy [EMAIL PROTECTED] wrote:
Robert Dailey wrote:
stuff = vars()
vars() is
Hi,
Is there a built in way to 'pretty print' a dict, list, and tuple
(Amongst other types)? Dicts probably print the ugliest of them all,
and it would be nice to see a way to print them in a readable way. I
can come up with my own function to do this, but I don't want to do
this if I don't have
On Dec 9, 2008, at 4:31 AM, Brian Allen Vanderburg II wrote:
There is one situation where a module can be imported/executed
twice, if it is the __main__ module.
That's an excellent point -- this is something I've run into, and it
always feels a bit awkward to code around it. What's the
On Dec 9, 4:31 pm, Robert Dailey [EMAIL PROTECTED] wrote:
Hi,
Is there a built in way to 'pretty print' a dict, list, and tuple
(Amongst other types)? Dicts probably print the ugliest of them all,
and it would be nice to see a way to print them in a readable way. I
can come up with my own
On Tue, 09 Dec 2008 17:31:41 +0200, Robert Dailey [EMAIL PROTECTED] wrote:
Is there a built in way to 'pretty print' a dict, list, and tuple
(Amongst other types)? Dicts probably print the ugliest of them all,
and it would be nice to see a way to print them in a readable way. I
can come up
On 2008-12-09, greg [EMAIL PROTECTED] wrote:
Duncan Booth wrote:
If I'm logged in to one of my servers in a large datacentre
then I don't what that system to beep as that would be pretty
useless.
It also might cause the datacentre operators some
consternation when one of their servers
On Tue, Dec 9, 2008 at 7:31 AM, Robert Dailey [EMAIL PROTECTED] wrote:
Hi,
Is there a built in way to 'pretty print' a dict, list, and tuple
(Amongst other types)? Dicts probably print the ugliest of them all,
and it would be nice to see a way to print them in a readable way. I
can come up
Hello everyone,
I have a problem with inheritance from list. I want to create a tree
like object where child nodes are kept in self[:] and every child has a
field that points to its parent. Pickling such an object, however,
throws an AssertionError. See below for source code and output of an
I came across a javascript library that returns all sorts of html
codes in the cookies it sets and I need my web framework (written in
python :)) to decode them. I'm aware of htmlentitydefs but
htmlentitydefs.entitydefs.keys( ) are of the form '#xxx' but this
javascript library uses stuff
On Dec 9, 6:26 am, André [EMAIL PROTECTED] wrote:
On Dec 8, 10:34 pm, Eric [EMAIL PROTECTED] wrote:
You should have a look athttp://wiki.python.org/moin/SummerOfCode
It's still early, so there's nothing yet for 2009, but I am sure that
some ongoing projects mentioned in previous years [like
On 2008-12-08, Bill McClain [EMAIL PROTECTED] wrote:
On 2008-12-08, Christian Heimes [EMAIL PROTECTED] wrote:
In this context 'str' means Python 3.0's str type, which is unicode in
2.x. Please report the misleading error message.
So this is an encoding problem? Can you give me a hint on
On Dec 9, 8:28 am, MRAB [EMAIL PROTECTED] wrote:
snip
In some languages (I think Delphi is one of them - it's been a while!)
some words which would normally be identifiers have a special meaning in
certain contexts, but the syntax precludes any ambiguity, and not in a
difficult way. as in
On Dec 9, 10:36 am, Joe Strout [EMAIL PROTECTED] wrote:
On Dec 9, 2008, at 4:31 AM, Brian Allen Vanderburg II wrote:
There is one situation where a module can be imported/executed
twice, if it is the __main__ module.
That's an excellent point -- this is something I've run into, and it
I'm looking at a person's code and I see a lot of stuff like this:
def myfunction():
# do some stuff stuff
my_string = function_that_returns_string()
# do some stuff with my_string
del my_string
# do some other stuff
On Dec 9, 11:28 am, Bill McClain
[EMAIL PROTECTED] wrote:
On 2008-12-08, Bill McClain [EMAIL PROTECTED] wrote:
On 2008-12-08, Christian Heimes [EMAIL PROTECTED] wrote:
In this context 'str' means Python 3.0's str type, which is unicode in
2.x. Please report the misleading error message.
Hello Klaus,
I have a problem with inheritance from list. I want to create a tree
like object where child nodes are kept in self[:] and every child has a
field that points to its parent. Pickling such an object, however,
throws an AssertionError. See below for source code and output of an
Hi comp.lang.python
I am a novice Python 2.5 programmer, who write some cmd line scripts
for processing large amounts of data.
I would like to have possibility to regularly print out the progress
made during the processing, say every 1 seconds, and i am wondering
what a proper generic way to do
On 9 Dec., 17:35, Albert Hopkins [EMAIL PROTECTED] wrote:
I'm looking at a person's code and I see a lot of stuff like this:
def myfunction():
# do some stuff stuff
my_string = function_that_returns_string()
# do some stuff with my_string
On 2008-12-09, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
This puzzles me too. According to the documentation StringIO accepts
both byte strings and unicode strings. Try to replace
output.write('First line.\n')
with
output.write(unicode('First line.\n'))
or
output.write(str('First
On Dec 9, 9:28 am, MRAB [EMAIL PROTECTED] wrote:
I certainly wouldn't want something like PL/I, where IF, THEN and
ELSE could be identifiers, so you could have code like:
IF IF = THEN THEN
THEN = ELSE;
ELSE
ELSE = IF;
Although I agree with the sentiment, you
On 9 Dec, 16:35, Albert Hopkins [EMAIL PROTECTED] wrote:
I'm looking at a person's code and I see a lot of stuff like this:
def myfunction():
# do some stuff stuff
my_string = function_that_returns_string()
# do some stuff with my_string
I code in Python 2.x intermittently and have only casually watched the
3.x development discussions. Now it's time to get up to speed.
Has someone written a tutorial for people in my situation. Yes, I've
looked at the release notes, but I'm looking for something that
motivates all the major
On Dec 9, 11:35 am, Albert Hopkins [EMAIL PROTECTED] wrote:
I'm looking at a person's code and I see a lot of stuff like this:
def myfunction():
# do some stuff stuff
my_string = function_that_returns_string()
# do some stuff with my_string
On Dec 9, 11:58 am, Tim Daneliuk [EMAIL PROTECTED] wrote:
I code in Python 2.x intermittently and have only casually watched the
3.x development discussions. Now it's time to get up to speed.
Has someone written a tutorial for people in my situation. Yes, I've
looked at the release notes,
On Dec 9, 2008, at 11:35 AM, Albert Hopkins wrote:
I'm looking at a person's code and I see a lot of stuff like this:
def myfunction():
# do some stuff stuff
my_string = function_that_returns_string()
# do some stuff with my_string
del
I have been debugging a distributed application for about 2 days that
has a memory leak. My app is a Twisted app, so I thought that maybe it
was on the twisted side, I finally isolated it to no being a Twisted
problem but a Python problem. The problem comes from the code that uses
wxPython and
Bill McClain wrote:
I've just installed 2.6, had been using 2.4.
This was working for me:
#! /usr/bin/env python
import StringIO
out = StringIO.StringIO()
print out, 'hello'
I used 2to3, and added import from future to get:
#! /usr/bin/env python
from
Say I have module foo.py:
def a(x):
def b():
x
del x
If I run foo.py under Python 2.4.4 I get:
File foo.py, line 4
del x
SyntaxError: can not delete variable 'x' referenced in nested
scope
Under Python
What did I do wrong?
Old Python version? :)
Seems to work in 3.0 (don't have 2.6 currently to check but IMO it's
fixed there as well).
It works for me with v3.0 as well, but not with v2.6.1 (same error as
stated before for v2.4).
Is there any way to fix this in v2.6.1 or even v2.4? Right now
Gabriel Rossetti wrote:
I ran these tests on linux 2.6 (ubuntu 8.04) using python 2.5.2.
Have you tried the much newer 2.6? 2.5.3 will be out soon with some bug
fixes.
--
http://mail.python.org/mailman/listinfo/python-list
Tim Daneliuk wrote:
I code in Python 2.x intermittently and have only casually watched the
3.x development discussions. Now it's time to get up to speed.
Has someone written a tutorial for people in my situation. Yes, I've
looked at the release notes, but I'm looking for something that
On Dec 9, 7:48 am, Paul Boddie [EMAIL PROTECTED] wrote:
On 9 Des, 14:24, Steven D'Aprano [EMAIL PROTECTED]
cybersource.com.au wrote:
That is not what Guido said. What he actually said was:
That's possible with sufficiently powerful parser technology, but
that's not how the Python parser
Robert Dailey wrote:
When I do:
for key in stuff.keys():
It works! I wonder why .keys() makes a difference. It is using a
'view', which is a new concept in Python 3.0 that I'm not totally
familiar with yet.
Because stuff.keys() is evaluated *once* and the result is a separate
object from
On Tue, 9 Dec 2008 at 08:40, Slaunger wrote:
I am a novice Python 2.5 programmer, who write some cmd line scripts
for processing large amounts of data.
I would like to have possibility to regularly print out the progress
made during the processing, say every 1 seconds, and i am wondering
what a
On Tue, Dec 9, 2008 at 6:39 AM, Paul Boddie [EMAIL PROTECTED] wrote:
On 9 Des, 05:52, alex23 [EMAIL PROTECTED] wrote:
From my perspective, it was less the original complaint and more the
sudden jump to CPython is dead! The GIL sucks! Academic eggheads!
that prompted the comparisons to
Aaron Brady wrote:
On Dec 9, 8:28 am, MRAB [EMAIL PROTECTED] wrote:
snip
In some languages (I think Delphi is one of them - it's been a while!)
some words which would normally be identifiers have a special meaning in
certain contexts, but the syntax precludes any ambiguity, and not in a
On Tue, 9 Dec 2008 at 13:11, Albert Hopkins wrote:
Say I have module foo.py:
def a(x):
def b():
x
del x
[...]
The difference is under Python 2.4 I get a traceback with the lineno and
offending line, but I do not get a traceback in Pythons 2.6 and 3.0.
On 2008-12-09, Peter Otten [EMAIL PROTECTED] wrote:
out = io.StringIO()
print(uhello, file=out, end=u\n)
out.getvalue()
u'hello\n'
That has the benefit of working. Thank you!
That can't be the intended behavior of print(), can it? Insering non-unicode
spaces and line terminators? I
Slaunger wrote:
Hi comp.lang.python
I am a novice Python 2.5 programmer, who write some cmd line scripts
for processing large amounts of data.
I would like to have possibility to regularly print out the progress
made during the processing, say every 1 seconds, and i am wondering
what a proper
Albert Hopkins [EMAIL PROTECTED] wrote:
def otherfunction():
try:
# some stuff
except SomeException, e:
# more stuff
del e
return
I think this looks ugly, but also does it not hurt performance
Bill McClain wrote:
On 2008-12-09, Peter Otten [EMAIL PROTECTED] wrote:
out = io.StringIO()
print(uhello, file=out, end=u\n)
out.getvalue()
u'hello\n'
That has the benefit of working. Thank you!
That can't be the intended behavior of print(), can it? Insering non-unicode
spaces and line
I just released Spring Python 0.9.1. One of our users spotted an error
in the a href=http://springpython.webfactional.com/reference/html/
objects.htmlIoC container/a involving constructor arguments, and I
was able to reproduce the problem, patch it, and get it released
quickly to the user
Mark Dickinson wrote:
On Dec 8, 2:24 pm, Rasmus Fogh [EMAIL PROTECTED] wrote:
So, I would much prefer a language change. I am not competent to even
propose one properly, but I'll try.
I don't see any technical problems in what you propose: as
far as I can see it's entirely feasible.
On 2008-12-09, MRAB [EMAIL PROTECTED] wrote:
In Python 2.x unmarked string literals are bytestrings. In Python 3.x
they're Unicode. The intention is to make the transition from 2.x to 3.x
easier by adding some features of 3.x to 2.x, but without breaking
backwards compatibility (not
Bill McClain wrote:
On 2008-12-09, Peter Otten [EMAIL PROTECTED] wrote:
out = io.StringIO()
print(uhello, file=out, end=u\n)
out.getvalue()
u'hello\n'
That has the benefit of working. Thank you!
That can't be the intended behavior of print(), can it? Insering
non-unicode spaces
You grossly overvalue using the in operator on lists. It's far more
common to use a dict or set for containment tests, due to O(1)
performance rather than O(n). I doubt the numpy array supports
hashing, so an error for misuse is all you should expect.
In the rare case that you want to test for
In article [EMAIL PROTECTED],
Klaus Kopec [EMAIL PROTECTED] wrote:
What did I do wrong?
Old Python version? :)
Seems to work in 3.0 (don't have 2.6 currently to check but IMO it's
fixed there as well).
It works for me with v3.0 as well, but not with v2.6.1 (same error as
stated before
On Tue, 9 Dec 2008 at 18:55, Duncan Booth wrote:
Albert Hopkins [EMAIL PROTECTED] wrote:
def otherfunction():
try:
# some stuff
except SomeException, e:
# more stuff
del e
return
I think this looks
Ivan Illarionov [EMAIL PROTECTED] writes:
On Dec 8, 9:02 pm, simonh [EMAIL PROTECTED] wrote:
Thanks for the many replies. Thanks especially to Pierre. This works
perfectly:
snip
def getAge():
while True:
try:
age = int(input('Please enter your age: '))
malkarouri a écrit :
(snip)
The del statement doesn't actually free memory. It just removes the
binding from the corresponding namespace. So in your first example,
my_string cannot be used after the deletion. Of course, if the string
referenced by my_string was referenced by some other name
On Sun, 07 Dec 2008 21:48:46 +, Tim Rowe wrote:
2008/12/7 walterbyrd [EMAIL PROTECTED]:
IMO: breaking backward compatibility is a big deal, and should only be
done when it is seriously needed.
Also, IMO, most of, if not all, of the changes being made in 3.0 are
debatable, at best. I can
conratulatios..
Here's my dear friend largest mobile library programs
All you care programs :
Witness all the programs in the modern world Alkmiotr
Honored by your visit
You'll see in the blogger
1.If you are suffering from a virus protection programs most important
to you
AVG Anti-Virus Free
On Tue, 2008-12-09 at 20:56 +, Lie Ryan wrote:
Actually I noticed a tendency from open-source projects to have slow
increment of version number, while proprietary projects usually have
big
version numbers.
Linux 2.x: 1991 Python 3.x.x: 1991. Apache 2.0: 1995. OpenOffice.org
3.0:
Carl Banks wrote:
[ ... ] Do you want the human reader to have to have all kinds of
rules to memorize about when a symbol is an identifier and when it's a
syntactic element? Do you want people to have to learn when to escape
a symbol so that the parser treats it as an identifier instead of
On Mon, 08 Dec 2008 20:55:16 +, Arnaud Delobelle wrote:
[EMAIL PROTECTED] writes:
class C:
def createfunc(self):
def self.func(arg):
return arg + 1
Or, after the class definition is done, to extend it dynamically:
def C.method(self, arg):
self.value =
On 9 Dec., 19:35, [EMAIL PROTECTED] wrote:
I felt like a little lunchtime challenge, so I wrote something that
I think matches your spec, based on your sample code. This is not
necessarily the best implementation, but I think it is simpler and
clearer than yours. The biggest change is that
1 - 100 of 266 matches
Mail list logo