Re: What is the difference between 32 and 64 bit Python on Windows 7 64 bit?

2014-05-11 Thread Terry Reedy
On 5/11/2014 2:56 AM, Ross Gayler wrote: Hi, I want to install Python on a PC with 16GB of RAM and the 64 bit version of Windows 7. I want Python to be able to use as much as possible of the RAM. When I install the 64 bit version of Python I find that sys.maxint == 2**31 - 1 Since

Re: What is the difference between 32 and 64 bit Python on Windows 7 64 bit?

2014-05-11 Thread Benjamin Kaplan
struictures I could have with 64 bit Python running on 64 bit linux. Is that true?I have spent a couple of hours searching for a definitive description of the difference between the 32 and 64 bit versions of Python for Windows and haven't found anything. long int (the size of an integer

Re: Surprising difference between StringIO.StringIO and io.StringIO

2013-05-31 Thread Serhiy Storchaka
30.05.13 23:46, Skip Montanaro написав(ла): Am I missing something about how io.StringIO works? I thought it was a more-or-less drop-in replacement for StringIO.StringIO. io.StringIO was backported from Python 3. It is a text (unicode) stream. cStringIO.StringIO is a binary stream and

Re: Surprising difference between StringIO.StringIO and io.StringIO

2013-05-31 Thread Peter Otten
Serhiy Storchaka wrote: 30.05.13 23:46, Skip Montanaro написав(ла): Am I missing something about how io.StringIO works? I thought it was a more-or-less drop-in replacement for StringIO.StringIO. io.StringIO was backported from Python 3. It is a text (unicode) stream. cStringIO.StringIO is

Re: Surprising difference between StringIO.StringIO and io.StringIO

2013-05-31 Thread Serhiy Storchaka
31.05.13 12:55, Peter Otten написав(ла): Serhiy Storchaka wrote: 30.05.13 23:46, Skip Montanaro написав(ла): Am I missing something about how io.StringIO works? I thought it was a more-or-less drop-in replacement for StringIO.StringIO. io.StringIO was backported from Python 3. It is a text

Surprising difference between StringIO.StringIO and io.StringIO

2013-05-30 Thread Skip Montanaro
Consider this quick session (Python 2.7 using the tip of the 2.7 branch in Mercurial): % python2.7 Python 2.7.5+ (2.7:93eb15779050, May 30 2013, 15:27:39) [GCC 4.4.6 [TWW]] on linux2 Type help, copyright, credits or license for more information. import traceback import StringIO s1 =

Re: Surprising difference between StringIO.StringIO and io.StringIO

2013-05-30 Thread Cameron Simpson
On 30May2013 15:46, Skip Montanaro s...@pobox.com wrote: | Consider this quick session (Python 2.7 using the tip of the 2.7 | branch in Mercurial): | | % python2.7 | Python 2.7.5+ (2.7:93eb15779050, May 30 2013, 15:27:39) | [GCC 4.4.6 [TWW]] on linux2 [...] | import io | s2 = io.StringIO()

Re: Surprising difference between StringIO.StringIO and io.StringIO

2013-05-30 Thread Göktuğ Kayaalp
io.StringIO only accepts Unicode input (i.e. umultibyte string), while StringIO.StringIO accepts either 8 bit input or unicode input. As you can see in the following excerpt from your traceback, the 'print_list' function creates an 8-bit string, which is then (probably) passed to 'file.write' as

Re: Surprising difference between StringIO.StringIO and io.StringIO

2013-05-30 Thread Skip Montanaro
I would expect io.StringIO to be a match for the io.* stuff in Python 3. So it should care whether it is a binary stream or a text stream. Whereas StringIO.StringIO is your good old Python 2 StringIO, which expects strs. On that basis, io.StringIO is a text stream, expecting Unicode

Re: [Python 2.7.3] What's the difference between these two uses of for?

2013-03-18 Thread Dave Angel
On 03/17/2013 10:14 PM, Yves S. Garret wrote: I don't get why it's posting what I said twice... Because you're using googlegroups, and haven't unchecked some poorly defined default setting. You're posting both to python-list and to comp.lang.python, each of which is mirrored to the other.

Re: What's the difference between these two uses of for?

2013-03-18 Thread alex23
On Mar 18, 12:33 pm, Roy Smith r...@panix.com wrote: Google's motto may be don't be evil, but they get to define what evil is.  Apparently working and playing well with mailing list technology which has worked just fine for literally decades isn't part of the definition. Their decision to

[Python 2.7.3] What's the difference between these two uses of for?

2013-03-17 Thread Yves S. Garret
N00b question. But here is the code: http://bin.cakephp.org/view/709201806 In the first example, the first for-loop is run and then the list is assigned to the tricky variable. But, what happens in the second example? Does the loop after in get run only once or multiple number of times? --

Re: [Python 2.7.3] What's the difference between these two uses of for?

2013-03-17 Thread Andrew Berg
, the for loop iterates over the list that sorted() returns. The only difference between the two is that the list that sorted() returns is assigned to a name in the first example. -- CPython 3.3.0 | Windows NT 6.2.9200 / FreeBSD 9.1 -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python 2.7.3] What's the difference between these two uses of for?

2013-03-17 Thread Gary Herron
On 03/17/2013 05:58 PM, Yves S. Garret wrote: N00b question. But here is the code: http://bin.cakephp.org/view/709201806 In the first example, the first for-loop is run and then the list is assigned to the tricky variable. But, what happens in the second example? Does the loop after in get

Re: [Python 2.7.3] What's the difference between these two uses of for?

2013-03-17 Thread Roy Smith
In article 485a3093-8c07-4d1a-b49e-af32f84f8...@googlegroups.com, Yves S. Garret yoursurrogate...@gmail.com wrote: N00b question. But here is the code: http://bin.cakephp.org/view/709201806 In the first example, the first for-loop is run and then the list is assigned to the tricky

Re: [Python 2.7.3] What's the difference between these two uses of for?

2013-03-17 Thread Yves S. Garret
On Sunday, March 17, 2013 9:18:12 PM UTC-4, Gary Herron wrote: On 03/17/2013 05:58 PM, Yves S. Garret wrote: N00b question. But here is the code: http://bin.cakephp.org/view/709201806 In the first example, the first for-loop is run and then the list is assigned to the

Re: [Python 2.7.3] What's the difference between these two uses of for?

2013-03-17 Thread Yves S. Garret
On Sunday, March 17, 2013 9:28:56 PM UTC-4, Roy Smith wrote: In article 485a3093...@googlegroups.com, Yves S. Garret your...@gmail.com wrote: N00b question. But here is the code: http://bin.cakephp.org/view/709201806 In the first example, the first for-loop is run

Re: [Python 2.7.3] What's the difference between these two uses of for?

2013-03-17 Thread Yves S. Garret
I don't get why it's posting what I said twice... -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python 2.7.3] What's the difference between these two uses of for?

2013-03-17 Thread Roy Smith
In article 7f3b4dde-fbd7-44ca-96bc-31a6b2894...@googlegroups.com, Yves S. Garret yoursurrogate...@gmail.com wrote: I'm trying to better understand what's going on behind the scenes and I appreciate your thorough input. What I don't understand is, how would you avoid creating L1? Leave out

Re: [Python 2.7.3] What's the difference between these two uses of for?

2013-03-17 Thread Roy Smith
In article mailman.3405.1363573404.2939.python-l...@python.org, Yves S. Garret yoursurrogate...@gmail.com wrote: I don't get why it's posting what I said twice... Because you're posting using the Google Groups web interface, right? Google Groups is just plain busted and double-posts

Re: [Python 2.7.3] What's the difference between these two uses of for?

2013-03-17 Thread Steven D'Aprano
On Sun, 17 Mar 2013 19:14:49 -0700, Yves S. Garret wrote: I don't get why it's posting what I said twice... Because you are emailing to the list, and CCing the list. In your email, you have: To: comp.lang.pyt...@googlegroups.com Cc: python-list@python.org Unfortunately, they are the same

Re: [Python 2.7.3] What's the difference between these two uses of for?

2013-03-17 Thread Roy Smith
In article 51467f6f$0$6599$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: there are at least three ways to post to this group: 1) Email to python-list@python.org 2) Post to the news group comp.lang.python on Usenet 3) Email to

Re: [Python 2.7.3] What's the difference between these two uses of for?

2013-03-17 Thread Terry Reedy
On 3/17/2013 8:58 PM, Yves S. Garret wrote: N00b question. But here is the code: http://bin.cakephp.org/view/709201806 Short code like this should be included in your message. tricky = sorted([w for w in set(text2) if 'cie' in w or 'cei' in w]) for word in tricky: print word, for word in

[issue17437] Difference between open and codecs.open

2013-03-16 Thread Giampaolo Rodola'
: docs@python components: Documentation messages: 184303 nosy: docs@python, ezio.melotti, giampaolo.rodola priority: normal severity: normal status: open title: Difference between open and codecs.open versions: Python 3.2, Python 3.3, Python 3.4 ___ Python

[issue17437] Difference between open and codecs.open

2013-03-16 Thread STINNER Victor
STINNER Victor added the comment: See also the PEP 400. I proposed (in the alternative) to make codecs.open() somehow an alias to open() (and add codecs.open_stream() for backward compatibility). -- nosy: +haypo ___ Python tracker

what is the difference between commenting and uncommenting the __init__ method in this class?

2013-01-28 Thread iMath
what is the difference between commenting and uncommenting the __init__ method in this class? class CounterList(list): counter = 0 ##def __init__(self, *args): ##super(CounterList, self).__init__(*args) def __getitem__(self, index): self.__class__

Re: what is the difference between commenting and uncommenting the __init__ method in this class?

2013-01-28 Thread Dave Angel
On 01/28/2013 09:09 PM, iMath wrote: what is the difference between commenting and uncommenting the __init__ method in this class? class CounterList(list): counter = 0 ##def __init__(self, *args): ##super(CounterList, self).__init__(*args) def __getitem__(self, index

Re: what is the difference between commenting and uncommenting the __init__ method in this class?

2013-01-28 Thread Mitya Sirenef
On 01/28/2013 09:09 PM, iMath wrote: what is the difference between commenting and uncommenting the __init__ method in this class? class CounterList(list): counter = 0 ## def __init__(self, *args): ## super(CounterList, self).__init__(*args) def __getitem__(self, index): self

iterating over the lines of a file - difference between Python 2.7 and 3?

2013-01-17 Thread Wolfgang Maier
disabled by next() call. In Python 2.7 there was no difference between the binary and text mode behavior. Could not find this documented either. -- http://mail.python.org/mailman/listinfo/python-list

Re: iterating over the lines of a file - difference between Python 2.7 and 3?

2013-01-17 Thread Peter Otten
position disabled by next() call. In Python 2.7 there was no difference between the binary and text mode behavior. Could not find this documented either. -- http://mail.python.org/mailman/listinfo/python-list

Re: iterating over the lines of a file - difference between Python 2.7 and 3?

2013-01-17 Thread Terry Reedy
On 1/17/2013 7:04 AM, Peter Otten wrote: Wolfgang Maier wrote: I just came across an unexpected behavior in Python 3.3, which has to do with file iterators and their interplay with other methods of file/IO class methods, like readline() and tell(): Basically, I got used to the fact that it is

RE: iterating over the lines of a file - difference between Python 2.7 and 3?

2013-01-17 Thread Wolfgang Maier
- From: Peter Otten [mailto:__pete...@web.de] Sent: Thursday, January 17, 2013 1:04 PM To: python-list@python.org Subject: Re: iterating over the lines of a file - difference between Python 2.7 and 3? You can get the Python 3 behaviour with io.open() in Python 2.7. There is an implementation

RE: iterating over the lines of a file - difference between Python 2.7 and 3?

2013-01-17 Thread Peter Otten
Wolfgang Maier wrote: What will my IO object return then when I read from it in Python 2.7? str where Python3 gives bytes, and unicode instead of str ? This is what I understood from the Python 2.7 io module doc. You can always double-check in the interpreter: with open(tmp.txt, w) as f:

Re: what’s the difference between socket.send() and socket.sendall() ?

2013-01-08 Thread Philipp Hagemeister
11:35 AM, iMath wrote: what’s the difference between socket.send() and socket.sendall() ? It is so hard for me to tell the difference between them from the python doc so what is the difference between them ? and each one is suitable for which case ? signature.asc Description: OpenPGP

what’s the difference between socket.send() and socket.sendall() ?

2013-01-07 Thread iMath
what’s the difference between socket.send() andsocket.sendall() ? It is so hard for me to tell the difference between them from the python doc so what is the difference between them ? and each one is suitable for which case ?-- http://mail.python.org/mailman/listinfo/python-list

Re: what’s the difference between socket.send() and socket.sendall() ?

2013-01-07 Thread Thomas Rachel
Am 07.01.2013 11:35 schrieb iMath: what’s the difference between socket.send() and socket.sendall() ? It is so hard for me to tell the difference between them from the python doc so what is the difference between them ? and each one is suitable for which case ? The docs are your friend

Re: what’s the difference between socket.send() and socket.sendall() ?

2013-01-07 Thread Steven D'Aprano
On Mon, 07 Jan 2013 18:35:20 +0800, iMath wrote: p class=MsoNormalttspan lang=EN-US style=font-size: 12pt; color: white; background-color: rgb(68, 110, 248); background-position: initial initial; background-repeat: initial initial; what’s the difference between socket/span/span lang=EN-US

Re: what’s the difference between socket.send() and socket.sendall() ?

2013-01-07 Thread Chris Angelico
On Tue, Jan 8, 2013 at 2:28 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I once was on a maths mailing list for about three years before I realised that the most prolific and helpful person there was as blind as a bat. And that, I think, is what s/he would have most

Difference between these two lists?

2013-01-07 Thread andydtaylor
Hi, Python newbie here again - this is probably a quick one. What's the difference between the lines I've numbered 1. and 2. below, which produce the following results: Results: 1. [ANG, BAR, BPK, CTN, QGH, QHD, KXX] 2. ['ANG', 'BAR', 'BPK', 'CTN', 'QGH', 'QHD', 'KXX'] Code

Re: Difference between these two lists?

2013-01-07 Thread andydtaylor
I think I can answer my own question on reflection the first one is actually a string I think? I was confused by the square brackets around the placeholder %s. -- http://mail.python.org/mailman/listinfo/python-list

Re: Difference between these two lists?

2013-01-07 Thread Chris Angelico
On Tue, Jan 8, 2013 at 12:00 PM, andydtay...@gmail.com wrote: Hi, Python newbie here again - this is probably a quick one. What's the difference between the lines I've numbered 1. and 2. below, which produce the following results: 1. print stn_fields = '[%s]' % ', '.join(map(str

Re: Difference between these two lists?

2013-01-07 Thread Chris Angelico
On Tue, Jan 8, 2013 at 12:06 PM, andydtay...@gmail.com wrote: I think I can answer my own question on reflection the first one is actually a string I think? I was confused by the square brackets around the placeholder %s. That's correct. Your first line is putting square brackets

Re: Difference between these two lists?

2013-01-07 Thread Roy Smith
In article 700d2bd9-e1df-4d38-81c7-77029a36c...@googlegroups.com, andydtay...@gmail.com wrote: Hi, Python newbie here again - this is probably a quick one. What's the difference between the lines I've numbered 1. and 2. below, which produce the following results: Results: 1. [ANG

Re: Difference between these two lists?

2013-01-07 Thread Dave Angel
On 01/07/2013 08:00 PM, andydtay...@gmail.com wrote: Hi, Python newbie here again - this is probably a quick one. What's the difference between the lines I've numbered 1. and 2. below, which produce the following results: Results: 1. [ANG, BAR, BPK, CTN, QGH, QHD, KXX] 2. ['ANG', 'BAR

Re: Difference between these two lists?

2013-01-07 Thread andydtaylor
Thanks, I think I'm clear now. I guess (map(str, stn_list)) was all about how to make a string starting with integers. I picked that up and began using it without realising it was over catering for a list already containing strings, and join(stn_list) was really all I required. Repr and Eval

Re: Difference between these two lists?

2013-01-07 Thread Chris Angelico
On Tue, Jan 8, 2013 at 1:21 PM, andydtay...@gmail.com wrote: Repr and Eval I think I get. Eval certainly. That's a familiar concept, and one I hope to use tomorrow to feed a line to psycopg2. I hope not. Why do you need eval? It's extremely dangerous. Chances are there's a better way to do

Difference between range and xrange ??

2012-11-05 Thread inshu chauhan
what is the difference between range and xrange.. both seem to work the same. ? And which should be used where and in what situations.. ?? -- http://mail.python.org/mailman/listinfo/python-list

Re: Difference between range and xrange ??

2012-11-05 Thread Dave Angel
On 11/05/2012 09:23 AM, inshu chauhan wrote: what is the difference between range and xrange.. both seem to work the same. ? And which should be used where and in what situations.. ?? One difference is that from versions of Python 3.0 and later, xrange doesn't exist, and range takes over

Re: Difference between range and xrange ??

2012-11-05 Thread Joel Goldstick
in python 2.x xrange is a generator and range returns a list. In python 3.x xrange is renamed to range replacing the list function with the generator On Mon, Nov 5, 2012 at 9:23 AM, inshu chauhan insidesh...@gmail.com wrote: what is the difference between range and xrange.. both seem to work

Re: Difference between range and xrange ??

2012-11-05 Thread Terry Reedy
On 11/5/2012 9:23 AM, inshu chauhan wrote: what is the difference between range and xrange.. both seem to work the same. ? range(3) [0, 1, 2] xrange(3) xrange(3) You should read the appropriate manual entries before asking trivial questions. They say pretty clearly that range returns

Re: what is the difference between st_ctime and st_mtime one is the time of last change and the other is the time of last modification, but i can not understand what is the difference between 'change'

2012-09-29 Thread Nobody
On Fri, 28 Sep 2012 11:48:23 -0600, Kristen J. Webb wrote: NOTE: I am a C programmer and new to python, so can anyone comment on what the st_ctime value is when os.stat() is called on Windows? The documentation[1] says: st_ctime - platform dependent; time of most recent metadata change on

what is the difference between st_ctime and st_mtime one is the time of last change and the other is the time of last modification, but i can not understand what is the difference between 'change' and

2012-09-28 Thread 陈伟
-- http://mail.python.org/mailman/listinfo/python-list

Re: what is the difference between st_ctime and st_mtime one is the time of last change and the other is the time of last modification, but i can not understand what is the difference between 'change'

2012-09-28 Thread Chris Angelico
On Fri, Sep 28, 2012 at 11:12 PM, 陈伟 chenwei.addr...@gmail.com wrote: -- http://mail.python.org/mailman/listinfo/python-list In future, can you put the body of your message into the body please? :) ctime is creation time, not change time. mtime is modification time, as you have. But I can

Re: what is the difference between st_ctime and st_mtime one is the time of last change and the other is the time of last modification, but i can not understand what is the difference between 'change'

2012-09-28 Thread Christian Heimes
Am 28.09.2012 17:07, schrieb Chris Angelico: On Fri, Sep 28, 2012 at 11:12 PM, 陈伟 chenwei.addr...@gmail.com wrote: -- http://mail.python.org/mailman/listinfo/python-list In future, can you put the body of your message into the body please? :) ctime is creation time, not change time.

Re: what is the difference between st_ctime and st_mtime one is the time of last change and the other is the time of last modification, but i can not understand what is the difference between 'change'

2012-09-28 Thread Chris Angelico
On Sat, Sep 29, 2012 at 1:18 AM, Christian Heimes christ...@python.org wrote: Am 28.09.2012 17:07, schrieb Chris Angelico: In the future please read the manual before replying! ;) You are wrong, ctime is *not* the creation time. It's the change time of the inode. It's updated whenever the

Re: what is the difference between st_ctime and st_mtime one is the time of last change and the other is the time of last modification, but i can not understand what is the difference between 'change'

2012-09-28 Thread Nobody
On Fri, 28 Sep 2012 06:12:35 -0700, 陈伟 wrote: what is the difference between st_ctime and st_mtime one is the time of last change and the other is the time of last modification, but i can not understand what is the difference between 'change' and 'modification'. st_mtime is updated when

Re: what is the difference between st_ctime and st_mtime one is the time of last change and the other is the time of last modification, but i can not understand what is the difference between 'change'

2012-09-28 Thread Kristen J. Webb
The Windows stat() call treats things differently, FROM: http://msdn.microsoft.com/en-us/library/14h5k7ff%28v=vs.80%29.aspx st_ctime Time of creation of file. Valid on NTFS but not on FAT formatted disk drives. I don't think that Windows has a concept of a change time for meta data

Re: Is there any difference between print 3 and print '3' in Python ?

2012-09-10 Thread Dwight Hutto
On Sun, Sep 9, 2012 at 10:41 AM, Ian Foote i...@feete.org wrote: On 09/09/12 14:23, iMath wrote: 在 2012年3月26日星期一UTC+8下午7时45分26秒,**iMath写道: I know the print statement produces the same result when both of these two instructions are executed ,I just want to know Is there any difference

Re: Is there any difference between print 3 and print '3' in Python ?

2012-09-10 Thread Benjamin Kaplan
instructions are executed ,I just want to know Is there any difference between print 3 and print '3' in Python ? thx everyone Here's a future import though I used,so I can use the planned 3 with a 2x python version in the command line interpreter: Microsoft Windows [Version 6.1.7600

Re: Is there any difference between print 3 and print '3' in Python ?

2012-09-10 Thread Terry Reedy
both of these two instructions are executed ,I just want to know Is there any difference between print 3 and print '3' in Python ? thx everyone Here's a future import though I used,so I can use the planned 3 with a 2x python version in the command line

Re: Is there any difference between print 3 and print '3' in Python ?

2012-09-09 Thread iMath
在 2012年3月26日星期一UTC+8下午7时45分26秒,iMath写道: I know the print statement produces the same result when both of these two instructions are executed ,I just want to know Is there any difference between print 3 and print '3' in Python ? thx everyone -- http://mail.python.org/mailman/listinfo/python

Re: Is there any difference between print 3 and print '3' in Python ?

2012-09-09 Thread Ian Foote
On 09/09/12 14:23, iMath wrote: 在 2012年3月26日星期一UTC+8下午7时45分26秒,iMath写道: I know the print statement produces the same result when both of these two instructions are executed ,I just want to know Is there any difference between print 3 and print '3' in Python ? thx everyone The difference

[issue14840] Tutorial: Add a bit on the difference between tuples and lists

2012-06-17 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset bb63919cde6e by Ezio Melotti in branch '2.7': #14840: Add a bit on the difference between tuples and lists. Initial patch by Zachary Ware. http://hg.python.org/cpython/rev/bb63919cde6e New changeset 3550416d83b3

[issue14840] Tutorial: Add a bit on the difference between tuples and lists

2012-06-17 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Fixed, thanks for the patch! -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14840

[issue14840] Tutorial: Add a bit on the difference between tuples and lists

2012-06-17 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Great addition, thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14840 ___ ___

[issue14840] Tutorial: Add a bit on the difference between tuples and lists

2012-05-21 Thread Zachary Ware
Zachary Ware zachary.w...@gmail.com added the comment: Ezio's version looks pretty good to me. About the only quibble I can think of is the removal of the example uses; they still apply and do help the point. Just tacking on Classic examples of tuples include (x, y) coordinate pairs and

[issue14840] Tutorial: Add a bit on the difference between tuples and lists

2012-05-19 Thread Ezio Melotti
, and their elements are usually homogeneous and are accessed by iterating on the list. FWIW homogeneous tuples are ok too, but here homogeneous is just a special case of heterogeneous. IMHO the main difference between lists and tuples is the way you access the elements (and homogeneous vs

[issue14840] Tutorial: Add a bit on the difference between tuples and lists

2012-05-19 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: I am ok with Ezio's 3rd version. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14840 ___ ___

[issue14840] Tutorial: Add a bit on the difference between tuples and lists

2012-05-19 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Here's a patch against 2.7. I changed a bit the previous paragraphs to make this fit better. -- assignee: docs@python - ezio.melotti Added file: http://bugs.python.org/file25645/issue14840.diff

[issue14840] Tutorial: Add a bit on the difference between tuples and lists

2012-05-18 Thread Zachary Ware
trying to stay away from this is how to do it, don't deviate. I didn't leave out other tuples uses intentionally, but my purpose was really to point out another way of thinking. Not long ago, I was wondering what the difference between tuples and lists really was and went searching. When I

Re: Difference between str.isdigit() and str.isdecimal() in Python 3

2012-05-17 Thread Marco
On 05/17/2012 02:15 AM, Steven D'Aprano wrote: the Fine Manual has more detail, although I admit it isn't *entirely* clear what it is talking about if you're not a Unicode expert: http://docs.python.org/py3k/library/stdtypes.html#str.isdecimal You are right, that is clear, thanks :)

Re: Difference between str.isdigit() and str.isdecimal() in Python 3

2012-05-17 Thread Devin Jeanpierre
On Wed, May 16, 2012 at 5:07 PM, Thomas 'PointedEars' Lahn pointede...@web.de wrote: RTFM. $ python3 -c 'print(42.isdecimal.__doc__ + \n); print(42.isdigit.__doc__)' Heh, don't print docstrings. Use pydoc. $ ( export PAGER=cat pydoc3 str.isdecimal pydoc3 str.isdigit ) Help on

Re: Difference between str.isdigit() and str.isdecimal() in Python 3

2012-05-17 Thread Terry Reedy
On 5/17/2012 4:23 AM, Devin Jeanpierre wrote: str.isdecimal = isdecimal(...) S.isdecimal() - bool Return True if there are only decimal characters in S, False otherwise. Help on method_descriptor in str: str.isdigit = isdigit(...) S.isdigit() - bool Return True if

[issue14840] Tutorial: Add a bit on the difference between tuples and lists

2012-05-17 Thread Zachary Ware
New submission from Zachary Ware zachary.w...@gmail.com: I was looking through the documentation source files for things I might be able to fix, and stumbled across XXX Add a bit on the difference between tuples and lists. in Doc\tutorial\datastructures.rst. So I took a stab at adding some

[issue14840] Tutorial: Add a bit on the difference between tuples and lists

2012-05-17 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: I personally like your suggested text, but there have been some discussion on the topic (on python-ideas iirc) and some people think that it's ok to use tuples like immutable lists, rather than just structures with heterogeneous elements

[issue14840] Tutorial: Add a bit on the difference between tuples and lists

2012-05-17 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: I don't think that the suggested text contradicts that. (Especially the wording tends to.) So I think this might be a reasonable addition, but I can see that some people might get upset :) -- nosy: +r.david.murray

[issue14840] Tutorial: Add a bit on the difference between tuples and lists

2012-05-17 Thread Zachary Ware
Zachary Ware zachary.w...@gmail.com added the comment: Perhaps an added line at the end, something like 'Of course, should you need an immutable list, tuples are quite handy for that, too.'? -- ___ Python tracker rep...@bugs.python.org

[issue14840] Tutorial: Add a bit on the difference between tuples and lists

2012-05-17 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Link to the discussion: https://groups.google.com/d/msg/python-ideas/P3lEYU9u0DU/H0gcuAAJvEgJ The actual discussion about tuples starts on https://groups.google.com/d/msg/python-ideas/P3lEYU9u0DU/JW2Lq3KYA4QJ and continues with the

[issue14840] Tutorial: Add a bit on the difference between tuples and lists

2012-05-17 Thread Terry J. Reedy
Terry J. Reedy tjre...@udel.edu added the comment: Zachary, you are brave/foolhardy to take this on;) I agree that the XXX comment should be removed. One possible resolution is to do just that, replacing it with nothing. I would note that the fuss over tuples versus lists comes from a time

Difference between str.isdigit() and str.isdecimal() in Python 3

2012-05-16 Thread Marco
Hi all, because There should be one-- and preferably only one --obvious way to do it, there should be a difference between the two methods in the subject, but I can't find it: '123'.isdecimal(), '123'.isdigit() (True, True) print('\u0660123') ٠123 '\u0660123'.isdigit(), '\u0660123

Re: Difference between str.isdigit() and str.isdecimal() in Python 3

2012-05-16 Thread Ian Kelly
On Wed, May 16, 2012 at 9:48 AM, Marco marc...@nsgmail.com wrote: Hi all, because There should be one-- and preferably only one --obvious way to do it, there should be a difference between the two methods in the subject, but I can't find it: '123'.isdecimal(), '123'.isdigit() (True, True

Re: Difference between str.isdigit() and str.isdecimal() in Python 3

2012-05-16 Thread MRAB
On 16/05/2012 16:48, Marco wrote: Hi all, because There should be one-- and preferably only one --obvious way to do it, there should be a difference between the two methods in the subject, but I can't find it: '123'.isdecimal(), '123'.isdigit() (True, True) print('\u0660123') ٠123

Re: Difference between str.isdigit() and str.isdecimal() in Python 3

2012-05-16 Thread Ulrich Eckhardt
Marco wrote: '123'.isdecimal(), '123'.isdigit() (True, True) print('\u0660123') ٠123 '\u0660123'.isdigit(), '\u0660123'.isdecimal() (True, True) print('\u216B') Ⅻ '\u216B'.isdecimal(), '\u216B'.isdigit() (False, False) [chr(a) for a in range(0x2) if chr(a).isdigit()]

Re: Difference between str.isdigit() and str.isdecimal() in Python 3

2012-05-16 Thread Ian Kelly
On Wed, May 16, 2012 at 10:24 AM, Ulrich Eckhardt dooms...@knuut.de wrote: Marco wrote:   '123'.isdecimal(), '123'.isdigit() (True, True)   print('\u0660123') ٠123   '\u0660123'.isdigit(), '\u0660123'.isdecimal() (True, True)   print('\u216B') Ⅻ   '\u216B'.isdecimal(), '\u216B'.isdigit()

Re: Difference between str.isdigit() and str.isdecimal() in Python 3

2012-05-16 Thread Marco
On 05/16/2012 06:24 PM, Ulrich Eckhardt wrote: Marco wrote: '123'.isdecimal(), '123'.isdigit() (True, True) print('\u0660123') ٠123 '\u0660123'.isdigit(), '\u0660123'.isdecimal() (True, True) print('\u216B') Ⅻ '\u216B'.isdecimal(), '\u216B'.isdigit()

Re: Difference between str.isdigit() and str.isdecimal() in Python 3

2012-05-16 Thread jmfauth
On 16 mai, 17:48, Marco marc...@nsgmail.com wrote: Hi all, because There should be one-- and preferably only one --obvious way to do it, there should be a difference between the two methods in the subject, but I can't find it:   '123'.isdecimal(), '123'.isdigit() (True, True)   print

Re: Difference between str.isdigit() and str.isdecimal() in Python 3

2012-05-16 Thread Thomas 'PointedEars' Lahn
Marco wrote: Hi all, because There should be one-- and preferably only one --obvious way to do it, there should be a difference between the two methods in the subject, but I can't find it: '123'.isdecimal(), '123'.isdigit() (True, True) print('\u0660123') ٠123 '\u0660123

Re: Difference between str.isdigit() and str.isdecimal() in Python 3

2012-05-16 Thread Ian Kelly
On Wed, May 16, 2012 at 3:07 PM, Thomas 'PointedEars' Lahn pointede...@web.de wrote: RTFM. $ python3 -c 'print(42.isdecimal.__doc__ + \n); print(42.isdigit.__doc__)' S.isdecimal() - bool Return True if there are only decimal characters in S, False otherwise. S.isdigit() - bool Return

Re: Difference between str.isdigit() and str.isdecimal() in Python 3

2012-05-16 Thread Steven D'Aprano
On Wed, 16 May 2012 17:48:19 +0200, Marco wrote: Hi all, because There should be one-- and preferably only one --obvious way to do it, there should be a difference between the two methods in the subject, but I can't find it: The Fine Manual has more detail, although I admit it isn't

Re: How to compute a delta: the difference between lists of strings

2012-05-05 Thread Chris Angelico
On Sat, May 5, 2012 at 10:12 PM, J. Mwebaze jmweb...@gmail.com wrote: This is out of curiosity, i know this can be done with python diffllib module, but been figuring out how to compute the delta, Consider two lists below. s1 = ['e', 'f', 'g', 'A', 'B', 'C', 'D', 'C'] s2 =['e', 'A', 'B',

Re: How to compute a delta: the difference between lists of strings

2012-05-05 Thread J. Mwebaze
thank Chris.. On Sat, May 5, 2012 at 2:39 PM, Chris Angelico ros...@gmail.com wrote:k On Sat, May 5, 2012 at 10:12 PM, J. Mwebaze jmweb...@gmail.com wrote: This is out of curiosity, i know this can be done with python diffllib module, but been figuring out how to compute the delta, Consider

Re: How to compute a delta: the difference between lists of strings

2012-05-05 Thread Emile van Sebille
On 5/5/2012 5:12 AM J. Mwebaze said... This is out of curiosity, i know this can be done with python diffllib module, but been figuring out how to compute the delta, Consider two lists below. s1 = ['e', 'f', 'g', 'A', 'B', 'C', 'D', 'C'] s2 =['e', 'A', 'B', 'f', 'g', 'C', 'D', 'z'] This is the

Re: How to compute a delta: the difference between lists of strings

2012-05-05 Thread Vito De Tullio
J. Mwebaze wrote: This is out of curiosity, i know this can be done with python diffllib module, but been figuring out how to compute the delta, Consider two lists below. s1 = ['e', 'f', 'g', 'A', 'B', 'C', 'D', 'C'] s2 =['e', 'A', 'B', 'f', 'g', 'C', 'D', 'z'] This is the result should

Difference between 'imp' and 'importlib'

2012-04-20 Thread Frank Millman
question is, is there any practical difference between the two approaches? What about 'There should be one-- and preferably only one --obvious way to do it'? Frank Millman -- http://mail.python.org/mailman/listinfo/python-list

Re: Difference between 'imp' and 'importlib'

2012-04-20 Thread Eric Snow
', and then 'importlib.import_module'. This also works, and does not reload the module. So my question is, is there any practical difference between the two approaches? What about 'There should be one-- and preferably only one --obvious way to do it'? importlib.import_module() is the preferred approach. It's

Difference between tempfile and spooled tempfile?

2012-04-05 Thread Alex van der Spek
I do not understand why the spooled write gives an error. See below. The normal tempfile works just fine. They are supposed to behave equal? All insight you can provide is welcome. Alex van der Spek + Python 2.7.1 (r271:86832, Nov 27 2010,

Re: Difference between tempfile and spooled tempfile?

2012-04-05 Thread Steve Howell
On Apr 5, 7:50 am, Alex van der Spek zd...@xs4all.nl wrote: I do not understand why the spooled write gives an error. See below. The normal tempfile works just fine. They are supposed to behave equal? All insight you can provide is welcome. Alex van der Spek

Re: Difference between tempfile and spooled tempfile?

2012-04-05 Thread Steve Howell
On Apr 5, 8:10 am, Steve Howell showel...@yahoo.com wrote: On Apr 5, 7:50 am, Alex van der Spek zd...@xs4all.nl wrote: I do not understand why the spooled write gives an error. See below. The normal tempfile works just fine. They are supposed to behave equal? All insight you can

Difference between json.load() and json.loads() [From: RE: question about file handling with with]

2012-03-28 Thread Nadir Sampaoli
Hello everyone (my first message in the mailing list), Is the following function correct? Yes, though I'd use json.load(f) instead of json.loads(). The docs http://docs.python.org/library/json.html#basic-usage aren't very clear (at least for me) about the difference between json.load

Re: Difference between json.load() and json.loads() [From: RE: question about file handling with with]

2012-03-28 Thread ian douglas
On Mar 28, 2012 6:54 AM, Nadir Sampaoli nadirsampa...@gmail.com wrote: Hello everyone (my first message in the mailing list), Is the following function correct? Yes, though I'd use json.load(f) instead of json.loads(). The docs aren't very clear (at least for me) about the difference

<    1   2   3   4   5   6   7   8   9   10   >