En Tue, 17 Jun 2008 03:15:11 -0300, pirata <[EMAIL PROTECTED]> escribió:
> I was trying to print a dot on console every second to indicates
> running process, so I wrote, for example:
>
> for i in xrange(10):
> print ".",
> time.sleep(1)
>
> Idealy, a dot will be printed out each second. B
On Jun 17, 8:43 am, Chris <[EMAIL PROTECTED]> wrote:
> On Jun 17, 5:50 am, [EMAIL PROTECTED] wrote:
>
>
>
> > I'm writing to see calcuration process.
> > And so, I can't catch StopIteration...
>
> > What is mistake?
>
> > def collatz(n):
> > r=[]
> > while n>1:
> > r.append(n)
> > n = 3
On Jun 17, 5:50 am, [EMAIL PROTECTED] wrote:
> I'm writing to see calcuration process.
> And so, I can't catch StopIteration...
>
> What is mistake?
>
> def collatz(n):
> r=[]
> while n>1:
> r.append(n)
> n = 3*n+1 if n%2 else n/2
> yield r
>
> for i, x in enumerate(collatz(13)):
>
En Mon, 16 Jun 2008 21:21:35 -0300, John Salerno <[EMAIL PROTECTED]> escribió:
> I wrote some pretty basic socket programming again, but I'm still confused
> about what's happening with the buffer_size variable. Here are the server and
> client programs:
>
> --
>
> from socket import
On Jun 17, 12:28 am, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> > My guess is that the two main memory allocate/deallocate cases are 1)
> > appending a new item to the end, and 2) GC'ing the entire data
> > structure. I would optimize these 2 at the expense of all others.
>
> Does that include
I was trying to print a dot on console every second to indicates
running process, so I wrote, for example:
for i in xrange(10):
print ".",
time.sleep(1)
Idealy, a dot will be printed out each second. But there is nothing
print out until after 10 seconds, all 10 dots come out together.
I
On Jun 17, 12:36 pm, Lie <[EMAIL PROTECTED]> wrote:
> On Jun 17, 10:50 am, [EMAIL PROTECTED] wrote:
>
>
>
> > I'm writing to see calcuration process.
> > And so, I can't catch StopIteration...
>
> > What is mistake?
>
(snip)
>
> In a for-loop, StopIteration is caught by the for-loop for your
> conv
En Mon, 16 Jun 2008 07:34:06 -0300, Bart Kastermans <[EMAIL PROTECTED]>
escribió:
> Summary: can't verify big O claim, how to properly time this?
>
> This is interesting. I had never attempted to verify a big O
> statement
> before, and decided that it would be worth trying. So I wrote some
> c
Is anyone aware of any prior work done with searching or matching a
pattern over nested Python lists? I have this problem where I have a
list like:
[1, 2, [1, 2, [1, 7], 9, 9], 10]
and I'd like to search for the pattern [1, 2, ANY] so that is returns:
[1, 2, [1, 2, [6, 7], 9, 9], 10]
[1, 2, [6,
On Jun 16, 9:16 pm, asdf <[EMAIL PROTECTED]> wrote:
> So I'm writing a script which will create several instances of User()
> class. I want each instance to be named after the login name
> of a user. I don't know beforehand how many users the script will
> have to create or how they are named. Rig
On Jun 17, 10:50 am, [EMAIL PROTECTED] wrote:
> I'm writing to see calcuration process.
> And so, I can't catch StopIteration...
>
> What is mistake?
>
> def collatz(n):
> r=[]
> while n>1:
> r.append(n)
> n = 3*n+1 if n%2 else n/2
> yield r
>
> for i, x in enumerate(collatz(13)):
>
> Yes I did my job, i had mention it before. but an application would not
> consist mine only, it could be incorporate your c extension module(s), and
> others, means problem could be from my side, yours, or others. Though
> forcing to reset the state would not mean fixing the real problem, but
Raymond Hettinger wrote:
On Jun 16, 9:53 pm, kretik <[EMAIL PROTECTED]> wrote:
I've been trying to coax this class to use something other than the
default '$' but it seems setting it to something else has no discernible
effect. Is it necessary to inherit from the class to do this?
Yes, subclas
> My guess is that the two main memory allocate/deallocate cases are 1)
> appending a new item to the end, and 2) GC'ing the entire data
> structure. I would optimize these 2 at the expense of all others.
Does that include dictionary lookups?
Regards,
Martin
--
http://mail.python.org/mailman/lis
>> For this API, I think it's important to make some performance guarantees.
>
> I may appreciate them for all Python collections :-)
See
http://wiki.python.org/moin/TimeComplexity
>> It seems fairly difficult to make byindex O(1), and
>> simultaneously also make insertion/deletion better than
On Jun 17, 11:07 am, "Leo Jay" <[EMAIL PROTECTED]> wrote:
> On Tue, Jun 17, 2008 at 11:29 AM, pirata <[EMAIL PROTECTED]> wrote:
> > I'm a bit confusing about whether "is not" equivelent to "!="
>
> > if a != b:
> > ...
>
> > if a is not b:
> > ...
>
> > What's the difference between "is not" and
On Jun 16, 9:53 pm, kretik <[EMAIL PROTECTED]> wrote:
> I've been trying to coax this class to use something other than the
> default '$' but it seems setting it to something else has no discernible
> effect. Is it necessary to inherit from the class to do this?
Yes, subclassing is the intended wa
I've been trying to coax this class to use something other than the
default '$' but it seems setting it to something else has no discernible
effect. Is it necessary to inherit from the class to do this?
I've only been using Python for a couple of weeks so I'm not sure what
the best approach is
Please sent your country nature picture in need it. plz ya
--
http://mail.python.org/mailman/listinfo/python-list
En Mon, 16 Jun 2008 06:29:09 -0300, Bruno Desthuilliers <[EMAIL PROTECTED]>
escribió:
> Gabriel Genellina a écrit :
>
>> It appears that you want to catch all exceptions, just use Exception for
>> that:
>> try:
>>...
>> except Exception:
>>...
>
> Hem... That's definitively *not* an a go
Jean-Paul Calderone wrote:
>
> There's plenty of things other than that one static variable that can get
> messed up in this scenario. The access violation could easily come along
> with random memory corruption. Fixing just the GC to handle this doesn't
> mean your program will be able to keep
DIGITAL TVhttp://digitaltvtech.blogspot.com
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, Jun 17, 2008 at 11:29 AM, pirata <[EMAIL PROTECTED]> wrote:
> I'm a bit confusing about whether "is not" equivelent to "!="
>
> if a != b:
> ...
>
> if a is not b:
> ...
>
>
> What's the difference between "is not" and "!=" or they are the same thing?
The 'is' is used to test do they poi
[EMAIL PROTECTED] wrote:
for i, x in enumerate(collatz(13)):
try:
last = x[:i+1]
print x[:i+1]
except StopIteration:
print last.appnd(1)
My guess would be because StopIteration is raised when control returns
to the for loop and sees that it has nothing else left. At that point
John Salerno wrote:
== and != test to see if the *value* of
two variables are the same.
Let me just clarify this. It might seem like a picky point, but I think
it's pretty important when learning Python.
I don't really mean the value of the variables themselves, I mean the
values that the
I'm writing to see calcuration process.
And so, I can't catch StopIteration...
What is mistake?
def collatz(n):
r=[]
while n>1:
r.append(n)
n = 3*n+1 if n%2 else n/2
yield r
for i, x in enumerate(collatz(13)):
try:
last = x[:i+1]
print x[:i+1]
except StopIteration:
On Jun 16, 10:29 pm, pirata <[EMAIL PROTECTED]> wrote:
> I'm a bit confusing about whether "is not" equivelent to "!="
>
> if a != b:
> ...
>
> if a is not b:
> ...
>
> What's the difference between "is not" and "!=" or they are the same thing?
"is not" is the logical negation of the "is" oper
pirata wrote:
I'm a bit confusing about whether "is not" equivelent to "!="
if a != b:
...
if a is not b:
...
What's the difference between "is not" and "!=" or they are the same thing?
The `==` operator tests equality. The `is` operator tests identity.
If you don't specifically inte
pirata wrote:
I'm a bit confusing about whether "is not" equivelent to "!="
if a != b:
...
if a is not b:
...
What's the difference between "is not" and "!=" or they are the same thing?
No, they are not the same thing. == and != test to see if the *value* of
two variables are the same.
[EMAIL PROTECTED] wrote:
On Jun 17, 8:02 am, bvdp <[EMAIL PROTECTED]> wrote:
Thanks. That was easy :)
The change to the _ast version is left as an exercise to the reader ;)
And I have absolutely no idea on how to do this. I can't even find the
_ast import file on my system. I'm assuming that
I'm a bit confusing about whether "is not" equivelent to "!="
if a != b:
...
if a is not b:
...
What's the difference between "is not" and "!=" or they are the same thing?
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 16, 5:24 pm, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote:
> > ``odict.byindex(index)``
>
> > Index-based lookup is supported by ``byindex()`` which returns
> > the key/value pair for an index, that is, the "position" of a
> > key in the ordered dict. 0 is the fir
"Hyuga" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
On Jun 13, 11:34 am, "Reedick, Andrew" <[EMAIL PROTECTED]> wrote:
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:python-
> [EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
> Sent: Friday, June 13, 2008 11:11 AM
Le Tuesday 17 June 2008 05:10:57 Maric Michaud, vous avez écrit :
> The class complextiy problem is actually solved by :
>
> inst_with_alg1 = MyClassUsingStrategies((algo1_strategy,),
> (algo1_strategy,)) inst_with_alg1_alg2 = MyClassUsingStrategies(
>
Le Monday 16 June 2008 20:35:22 George Sakkis, vous avez écrit :
> On Jun 16, 1:49 pm, Gerard flanagan <[EMAIL PROTECTED]> wrote:
> > George Sakkis wrote:
> > > I have a situation where one class can be customized with several
> > > orthogonal options. Currently this is implemented with (multiple)
On Jun 16, 8:24 am, Bruno Desthuilliers wrote:
>
> IIRC (please someone correct me if I'm wrong), proper release of file
> resources as soon as the file object gets out of scope is not garanteed
> in the language spec and is implementation dependant.
Right. Resources are freed in CPython right af
On Jun 17, 8:02 am, bvdp <[EMAIL PROTECTED]> wrote:
> Thanks. That was easy :)
>
> > The change to the _ast version is left as an exercise to the reader ;)
>
> And I have absolutely no idea on how to do this. I can't even find the
> _ast import file on my system. I'm assuming that the _ast definit
takayuki wrote:
Paul,
Thank you for the informative reply.
Yes, I created the indent problem when manually copying the original
script when I posted. (I'm using an old laptop to study python and
posting here using the desktop.)
Your examples really helped. Last night I played with using a fo
takayuki wrote:
I'm early on in my python adventure so I'm not there yet on the strip
command nuances.I'm reading "How to think like a python
programmer" first. It's great.
Then "Learning python". I've read parts of Dive into Python and will
work through it fully when I'm a little farther
So I'm writing a script which will create several instances of User()
class. I want each instance to be named after the login name
of a user. I don't know beforehand how many users the script will
have to create or how they are named. Right now I've created a dictionary
of usernames as keys and obj
On Jun 17, 6:34 am, Thomas Hill <[EMAIL PROTECTED]> wrote:
> On Jun 15, 6:23 pm, takayuki <[EMAIL PROTECTED]> wrote:
>
> > def hasnolet(avoid):
> > fin = open('animals.txt')
> > for line in fin:
> > word = line.strip()
> > for letter in avoid:
> >
Paul,
Thank you for the informative reply.
Yes, I created the indent problem when manually copying the original
script when I posted. (I'm using an old laptop to study python and
posting here using the desktop.)
Your examples really helped. Last night I played with using a for
loop instead of
have you guys seen this on Slashdot yet? (i did a quick search in the
archives and haven't seen any posts yet so hopefully this isn't a
duplicate msg!)
http://developers.slashdot.org/developers/08/06/16/1855209.shtml
this video is a visualization of the commits to the source base (and
made by who
I wrote some pretty basic socket programming again, but I'm still confused
about what's happening with the buffer_size variable. Here are the server and
client programs:
--
from socket import *
host = ''
port = 51567
address = (host, port)
buffer_size = 1024
server_socket = socket
Cédric Lucantis wrote:
I don't see any string method to do that
>>> 'abcde'.translate(str.maketrans('','','bcd'))
'ae'
I do not claim this to be better than all the other methods,
but this pair can also translate while deleting, which others cannot.
--
http://mail.python.org/mailman/listin
Hello
It seems like I have Unicode data in a CSV file but Python is using
a different code page, so isn't happy when I'm trying to read and put
this data into an SQLite database with APSW:
sql = "INSERT INTO mytable (col1,col2) VALUES (?,?)"
cursor.executemany(sql, records("test.
In article <[EMAIL PROTECTED]>,
David Hughes <[EMAIL PROTECTED]> wrote:
>
>Who coined this originally?
AFAICT, none other than Guido.
--
Aahz ([EMAIL PROTECTED]) <*> http://www.pythoncraft.com/
"as long as we like the same operating system, things are cool." --piranha
--
http
When and why would I ever use
> "__main__" or the many other "__whatever__" constructs?
You don't generally use those names directly, they are 'magic'. The
__add__ example is a good one. When you do `"hello " + "world"` behind
the scenes python is actually calling "hello ".__add__("world").
There
On Jun 16, 5:15 pm, Gerhard Häring <[EMAIL PROTECTED]> wrote:
> milan_sanremo wrote:
> > I have sqlite installed, but when I try to importsqlite3I receive:
>
> > Python 2.5.1 (r251:54863, Nov 3 2007, 02:54:36) [C] on sunos5
> > Type "help", "copyright", "credits" or "license" for more information.
On Jun 16, 4:56 pm, [EMAIL PROTECTED] wrote:
> After a couple of weeks studying Python, I already have a few useful
> scripts, including one that downloads 1500 Yahoo stock quotes in 6
> seconds. However, many things are puzzling to me. I keep on seeing
> things like "__main__" in scripts. A more
Martin v. L.:
> For this API, I think it's important to make some performance guarantees.
I may appreciate them for all Python collections :-)
> It seems fairly difficult to make byindex O(1), and
> simultaneously also make insertion/deletion better than O(n).
It may be possible to make both of
On Mon, Jun 16, 2008 at 5:56 PM, <[EMAIL PROTECTED]> wrote:
> After a couple of weeks studying Python, I already have a few useful
> scripts, including one that downloads 1500 Yahoo stock quotes in 6
> seconds. However, many things are puzzling to me. I keep on seeing
> things like "__main__" in s
> ``odict.byindex(index)``
>
> Index-based lookup is supported by ``byindex()`` which returns
> the key/value pair for an index, that is, the "position" of a
> key in the ordered dict. 0 is the first key/value pair, -1
> the last.
>
> >>> d.byindex(2)
On Jun 16, 2:56 pm, [EMAIL PROTECTED] wrote:
> After a couple of weeks studying Python, I already have a few useful
> scripts, including one that downloads 1500 Yahoo stock quotes in 6
> seconds. However, many things are puzzling to me. I keep on seeing
> things like "__main__" in scripts. A more
George Sakkis wrote:
On Jun 16, 4:47 pm, bvdp <[EMAIL PROTECTED]> wrote:
2. I thought I'd be happy with * / + -, etc. Of course now I want to add
a few more funcs like int() and sin(). How would I do that?
For the builtin eval, just populate the globals dict with the names
you want to make av
After a couple of weeks studying Python, I already have a few useful
scripts, including one that downloads 1500 Yahoo stock quotes in 6
seconds. However, many things are puzzling to me. I keep on seeing
things like "__main__" in scripts. A more obscure example would be
"__add__" used in string con
On Jun 16, 11:16 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote:
> méchoui schrieb:
>
>
>
> > Problem:
>
> > - You have tree structure (XML-like) that you don't want to create
> > 100% in memory, because it just takes too long (for instance, you need
> > a http request to request the information
On Jun 16, 2:34 pm, Thomas Hill <[EMAIL PROTECTED]> wrote:
> On Jun 15, 6:23 pm, takayuki <[EMAIL PROTECTED]> wrote:
>
> > def hasnolet(avoid):
> > fin = open('animals.txt')
> > for line in fin:
> > word = line.strip()
> > for letter in avoid:
> >
On Jun 15, 6:23 pm, takayuki <[EMAIL PROTECTED]> wrote:
> def hasnolet(avoid):
> fin = open('animals.txt')
> for line in fin:
> word = line.strip()
> for letter in avoid:
> if letter in word:
> b
Ben Finney <[EMAIL PROTECTED]> wrote:
> Peter Bengtsson <[EMAIL PROTECTED]> writes:
>
> > My poor understanding is that the difference between `sorted(somelist,
> > key=lambda x:...)` and `somelist.sort(lambda x,y...)` is that one
> > returns a new list and the other sorts in-place.
>
> Yes.
>
On Jun 16, 4:47 pm, bvdp <[EMAIL PROTECTED]> wrote:
> 2. I thought I'd be happy with * / + -, etc. Of course now I want to add
> a few more funcs like int() and sin(). How would I do that?
For the builtin eval, just populate the globals dict with the names
you want to make available:
import math
méchoui schrieb:
Problem:
- You have tree structure (XML-like) that you don't want to create
100% in memory, because it just takes too long (for instance, you need
a http request to request the information from a slow distant site).
- But you want to be able to request data from it, such has "gi
milan_sanremo wrote:
> I have sqlite installed, but when I try to import sqlite3 I receive:
>
> Python 2.5.1 (r251:54863, Nov 3 2007, 02:54:36) [C] on sunos5
> Type "help", "copyright", "credits" or "license" for more information.
import sqlite3
> Traceback (most recent call last):
> File
On Jun 16, 12:57 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> On Jun 15, 11:30 pm, Christian Heimes <[EMAIL PROTECTED]> wrote:
>
>
>
> > [EMAIL PROTECTED] wrote:
> > > I have a physical system set up in which a body is supposed to
> > > accelerate and to get very close to lightspeed, while
Okay guys. I have the _ast based safe eval installed and working in my
program. It appears to be working just fine. Thanks for the help.
Now, a few more questions:
1. I see that _ast is a 2.5 module?? So, for folks using my code with
<2.5 I could do something like this:
# I've got some imp
On Jun 16, 7:17 am, Paul Hankin <[EMAIL PROTECTED]> wrote:
> On Jun 16, 2:35 pm, takayuki <[EMAIL PROTECTED]> wrote:
>
>
>
> > def hasnolet2(avoid):
> > fin = open('animals.txt')
> > for line in fin:
> > word = line.strip()
>
> > length = len(avoid)
> >
John [H2O] wrote:
Dan Bishop wrote:
Python just uses the atof() function from the underlying C library.
Some of them handle NaN's, and some of them don't.
As a work around, how would I write this in list comprehension form:
newlist=[]
for i in range(len(v[1])):
We've been using NetWorkSpaces
(http://www.ddj.com/web-development/21971) for IPC on programs running
on several different machines. Since it uses a central, shared server for
storing values, you don't have to write socket code in your various programs
to pass data back and forth.
For example
A veteran engineer from VMWare Inc., Jeffrey, is being featured on
jobirn.com on Monday Jun 16, from 9am to 5pm (PST.)
He will chat with applicants who are interested in job openings in
VMWare.
He will identify qualified candidates and directly submit qualified
candidates' resumes to hiring manager
Problem:
- You have tree structure (XML-like) that you don't want to create
100% in memory, because it just takes too long (for instance, you need
a http request to request the information from a slow distant site).
- But you want to be able to request data from it, such has "give me
all nodes tha
On Mon, Jun 16, 2008 at 12:07 PM, Alex Elder <[EMAIL PROTECTED]> wrote:
> I found this article useful when dealing with strings in Python:
>
>http://www.skymind.com/~ocrow/python_string/
>
> It may help squeeze some more time out of your code. 8-)
Things seem to have changed since then. I
Being new on on Python (but otherwise experienced programmer this message
triggered me to do the install.
It looks like a nice way to do a comprehensive check of your system.
When running one of the py2exe samples, located in
C:\Python25\Lib\site-packages\py2exe\samples\singlefile\gui I got the
U.S. President George Bush has met with Pope Benedict at the Vatican,
as he continues his week-long European trip.
After his talks with the pontiff, Mr. Bush was traveling to Paris,
France, where he is to give a speech later Friday on the strong
relationship between the U.S. and Europe.
U.S. Nati
On Mon, 16 Jun 2008 11:30:19 -0600, Ian Kelly <[EMAIL PROTECTED]> wrote:
On Mon, Jun 16, 2008 at 11:09 AM, Jean-Paul Calderone
<[EMAIL PROTECTED]> wrote:
It will depend what version of Python you're using and the *exact* details
of the code in question. An optimization was introduced where, if
Does ConfigParser allow writing configuration changes also?
"Dennis Lee Bieber" <[EMAIL PROTECTED]> schreef in bericht
news:[EMAIL PROTECTED]
> On Sat, 14 Jun 2008 21:27:19 +0200, "Robert" <[EMAIL PROTECTED]>
> declaimed the following in comp.lang.python:
>
> > What is the most Pythonic way to ma
On 16 juin, 10:37, Armin Ronacher <[EMAIL PROTECTED]> wrote:
> Abstract
>
>
> This PEP proposes an ordered dictionary as a new data structure for
> the ``collections`` module, called "odict" in this PEP for short. The
> proposed API incorporates the experiences gained from working with
>
On Jun 16, 1:49 pm, Gerard flanagan <[EMAIL PROTECTED]> wrote:
> George Sakkis wrote:
> > I have a situation where one class can be customized with several
> > orthogonal options. Currently this is implemented with (multiple)
> > inheritance but this leads to combinatorial explosion of subclasses
On Jun 17, 12:59 am, milan_sanremo <[EMAIL PROTECTED]> wrote:
> I have sqlite installed, but when I try to import sqlite3 I receive:
>
> Python 2.5.1 (r251:54863, Nov 3 2007, 02:54:36) [C] on sunos5
> Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>
> Tra
Dan Bishop wrote:
>
>
>
> Python just uses the atof() function from the underlying C library.
> Some of them handle NaN's, and some of them don't.
>
>
As a work around, how would I write this in list comprehension form:
newlist=[]
for i in range(len(v[1])):
t
I found this article useful when dealing with strings in Python:
http://www.skymind.com/~ocrow/python_string/
It may help squeeze some more time out of your code. 8-)
Alex.
--
http://mail.python.org/mailman/listinfo/python-list
I have sqlite installed, but when I try to import sqlite3 I receive:
Python 2.5.1 (r251:54863, Nov 3 2007, 02:54:36) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
Traceback (most recent call last):
File "", line 1, in
ImportError: No mo
Wolfgang Grafen <[EMAIL PROTECTED]>:
> I couldn't get it work on Solaris (modified some lines for Python2.3).
If solaris doesn't have a readline library, you might try to compile gnu
readline, and recompile python (also a chance to get the current version
2.5)
> One reason was that I had to down
George Sakkis wrote:
I have a situation where one class can be customized with several
orthogonal options. Currently this is implemented with (multiple)
inheritance but this leads to combinatorial explosion of subclasses as
more orthogonal features are added. Naturally, the decorator pattern
[1]
On Jun 16, 5:11 am, Peter Bengtsson <[EMAIL PROTECTED]> wrote:
> My poor understanding is that the difference between `sorted(somelist,
> key=lambda x:...)` and `somelist.sort(lambda x,y...)` is that one
> returns a new list and the other sorts in-place.
>
> Does that mean that .sort() is more effi
On Mon, Jun 16, 2008 at 11:09 AM, Jean-Paul Calderone
<[EMAIL PROTECTED]> wrote:
> It will depend what version of Python you're using and the *exact* details
> of the code in question. An optimization was introduced where, if the
> string being concatenated to is not referred to anywhere else, it
On Jun 16, 10:09 am, Peter Otten <[EMAIL PROTECTED]> wrote:
> Ethan Furman wrote:
> > The strip() method of strings works from both ends towards the middle.
> > Is there a simple, built-in way to remove several characters from a
> > string no matter their location? (besides .replace() ;)
> >>> iden
Ethan Furman wrote:
> The strip() method of strings works from both ends towards the middle.
> Is there a simple, built-in way to remove several characters from a
> string no matter their location? (besides .replace() ;)
>>> identity = "".join(map(chr, range(256)))
>>> 'www.example.com'.translate
QOTW: "The problem [with C++] is, I never feel like I'm programing
the *problem*, I always feel like I'm programming the *language*." - Roy Smith
Alternatives to the Decimal type:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/9cd6dae725268afb/
How
On Mon, 16 Jun 2008 10:41:05 -0600, Ian Kelly <[EMAIL PROTECTED]> wrote:
On Mon, Jun 16, 2008 at 4:34 AM, Bart Kastermans <[EMAIL PROTECTED]> wrote:
This is interesting. I had never attempted to verify a big O
statement
before, and decided that it would be worth trying. So I wrote some
code to
Le Monday 16 June 2008 18:58:06 Ethan Furman, vous avez écrit :
> The strip() method of strings works from both ends towards the middle.
> Is there a simple, built-in way to remove several characters from a
> string no matter their location? (besides .replace() ;)
>
> For example:
> .strip --> 'www
I'm very happy to see this PEP. I have needed to use ordered
dictionaries many times, and this has always felt to me like a
surprising omission from Python.
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Jun 16, 2008 at 4:34 AM, Bart Kastermans <[EMAIL PROTECTED]> wrote:
> This is interesting. I had never attempted to verify a big O
> statement
> before, and decided that it would be worth trying. So I wrote some
> code to
> collect data, and I can't find that it goes quadratic. I have th
Ethan Furman wrote:
Greetings.
The strip() method of strings works from both ends towards the middle.
Is there a simple, built-in way to remove several characters from a
string no matter their location? (besides .replace() ;)
For example:
.strip --> 'www.example.com'.strip('cmowz.')
'example'
Hi,
> Greetings.
>
> The strip() method of strings works from both ends towards the middle.
> Is there a simple, built-in way to remove several characters from a
> string no matter their location? (besides .replace() ;)
>
> For example:
> .strip --> 'www.example.com'.strip('cmowz.')
> 'example'
>
On Jun 16, 2008, at 12:58 PM, Ethan Furman wrote:
Greetings.
The strip() method of strings works from both ends towards the middle.
Is there a simple, built-in way to remove several characters from a
string no matter their location? (besides .replace() ;)
For example:
.strip --> 'www.exampl
Jimmy Retzlaff wrote:
py2exe 0.6.8 released
=
py2exe is a Python distutils extension which converts Python scripts
into executable Windows programs, able to run without requiring a
Python installation. Console and Windows (GUI) applications, Windows
NT services, exe and dll C
Greetings.
The strip() method of strings works from both ends towards the middle.
Is there a simple, built-in way to remove several characters from a
string no matter their location? (besides .replace() ;)
For example:
.strip --> 'www.example.com'.strip('cmowz.')
'example'
.??? --> --- 'www.ex
> Ok, I see how this would work (and it's trivial to make it cache the
> generated classes for future use) but I guess I was looking for a more
> "mainstream" approach, something that even a primitive statically
> typed language could run :) Even in Python though, I think of Runtime
> Type Generati
Hello friends & guys,
I want to tell you about great site I found. They pay me to read e-
mail,
visit sign in the web sites and much more. earn easily without
investment.
It's free to join and easy to sign up! CLICK THIS
LINK TO VISIT: http://www.ippomails.net/pages/index.php?refid=veeramani
http
u want the all sexye flimes ues this
u want me see this ***
***
http;//lesbiangroupsexy.blogspot.com/
--
http://mail.python.org/mailman/lis
1 - 100 of 147 matches
Mail list logo