[Tutor] how obsolete is 2.2?
Alan Gauld
alan.gauld at btinternet.com
Thu Sep 8 10:25:25 CEST 2011
On 08/09/11 04:26, c smith wrote:
> I found a book at the local library that covers python but it's 2.2.
> I already have been using 2.7 for basic stuff and would like to know if
> it's worth my time to read this book.
That depends on your experience level and what you are looking to get
out of it.
The Python 2 series is very backwards compatible so virtually everything
you read in the book will still work in Python 2.7. It's just that some
new whizzy features have been added since 2.2 that it won't cover. But
many of those features are not things the average programmer uses every day.
The vast majority of the standard library modules haven't changed that
much and any information about those will probably still be accurate.
Given you get to read it for free from the library I'd say yes, its very
worthwhile.
But if you have been using Python for a while and want to dig deeper
into its power features then it probably isn't worth reading because the
changes in Python recently have focused on many of the more subtle
things "under the covers" and 2.2 won't cover them,
> can pickle deserialize things that were not serialized by python?
Not unless the thing that serialised them was deliberately copying
Pythons serialisation format.
> can it convert data into a python data type regardless of it was
> originally a 'c array' or something else that python doesn't support?
No, the nearest thing to that is the struct module. But there you have
to know what you are reading and construct a format specifier to match.
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
More information about the Tutor
mailing list