Re: [Tutor] making a string

2013-05-26 Thread Steven D'Aprano
On 27/05/13 10:43, Jim Mooney wrote: On 26 May 2013 17:38, eryksun wrote: On Sun, May 26, 2013 at 8:20 PM, Steven D'Aprano wrote: On 27/05/13 07:40, Jim Mooney wrote: Good to know that compile doesn't check syntax, since I erroneously thought it did. compile does check syntax. Attemptin

Re: [Tutor] making a string

2013-05-26 Thread Jim Mooney
On 26 May 2013 17:38, eryksun wrote: > On Sun, May 26, 2013 at 8:20 PM, Steven D'Aprano wrote: >> On 27/05/13 07:40, Jim Mooney wrote: >> >>> Good to know that compile doesn't check syntax, since I erroneously >>> thought it did. >> >> compile does check syntax. > > Attempting to iterate an integ

Re: [Tutor] making a string

2013-05-26 Thread eryksun
On Sun, May 26, 2013 at 8:20 PM, Steven D'Aprano wrote: > On 27/05/13 07:40, Jim Mooney wrote: > >> Good to know that compile doesn't check syntax, since I erroneously >> thought it did. > > compile does check syntax. Attempting to iterate an integer is a runtime TypeError, not a compile-time Syn

Re: [Tutor] making a string

2013-05-26 Thread Jim Mooney
On 26 May 2013 17:20, Steven D'Aprano wrote: > On 27/05/13 07:40, Jim Mooney wrote: > >> Good to know that compile doesn't check syntax, since I erroneously >> thought it did. > > > compile does check syntax. I'm unclear on something. The code below creates bytecode and I don't see an error messa

Re: [Tutor] making a string

2013-05-26 Thread Steven D'Aprano
On 27/05/13 07:40, Jim Mooney wrote: Good to know that compile doesn't check syntax, since I erroneously thought it did. compile does check syntax. py> compile("23 = 43", "", "exec") Traceback (most recent call last): File "", line 1, in File "", line 1 SyntaxError: can't assign to lite

Re: [Tutor] making a string

2013-05-26 Thread Mark Lawrence
On 26/05/2013 22:40, Jim Mooney wrote: On 26 May 2013 02:51, Mark Lawrence wrote: Basically no. Python 2.7 is guaranteed to be backward compatible with Python 2.6. New or improved functionality will be listed in the "What's New for Python 2.7". In fact if you look at the "What's New for Pyth

Re: [Tutor] making a string

2013-05-26 Thread Jim Mooney
On 26 May 2013 02:51, Mark Lawrence wrote: > Basically no. Python 2.7 is guaranteed to be backward compatible with > Python 2.6. New or improved functionality will be listed in the "What's New > for Python 2.7". In fact if you look at the "What's New for Python 3.3" > you'll find all of the "Wh

Re: [Tutor] making a string

2013-05-26 Thread Mark Lawrence
On 26/05/2013 05:10, Jim Mooney wrote: On 25 May 2013 20:49, Tim Hanson wrote: A lot of people tend to be intimidated by Mark Lutz, and so am I, I guess. Interesting coincidence. This is a retirement project and I just decided on the Lutz book, which looked comprehensive, since the book I'm

Re: [Tutor] making a string

2013-05-25 Thread Tim Hanson
On Saturday, May 25, 2013 09:10:00 pm Jim Mooney wrote: > On 25 May 2013 20:49, Tim Hanson wrote: > > A lot of people tend to be intimidated by Mark Lutz, and so am I, I > > guess. > > Interesting coincidence. This is a retirement project and I just > decided on the Lutz book, which looked compre

Re: [Tutor] making a string

2013-05-25 Thread Jim Mooney
On 25 May 2013 20:49, Tim Hanson wrote: > A lot of people tend to be intimidated by Mark Lutz, and so am I, I guess. Interesting coincidence. This is a retirement project and I just decided on the Lutz book, which looked comprehensive, since the book I'm using is more CompSci but PyDeficient. Ho

Re: [Tutor] making a string

2013-05-25 Thread Tim Hanson
On Saturday, May 25, 2013 08:31:49 pm Martin A. Brown wrote: > Greetings Tim, > > : I'm new to this, just getting through the first Mark Lutz book. > > Python objects, either variables your ham below or the string 'spam' > you entered manually have a specific type. Each and every variable > or

Re: [Tutor] making a string

2013-05-25 Thread Martin A. Brown
Greetings Tim, : I'm new to this, just getting through the first Mark Lutz book. Python objects, either variables your ham below or the string 'spam' you entered manually have a specific type. Each and every variable or object has a type. I think you are trying to figure out how you start

Re: [Tutor] making a string

2013-05-25 Thread Mark Lawrence
On 26/05/2013 04:07, Tim Hanson wrote: I'm new to this, just getting through the first Mark Lutz book. If I start out with : ham=list('spam');ham ['s','p','a','m'] How do I get a string back? ___ Tutor maillist - Tutor@python.org To unsubscribe or

[Tutor] making a string

2013-05-25 Thread Tim Hanson
I'm new to this, just getting through the first Mark Lutz book. If I start out with : ham=list('spam');ham ['s','p','a','m'] How do I get a string back? ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mai