A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-April/003795.html below:

[Python-Dev] Changing PYC-Magic

[Python-Dev] Changing PYC-Magic [Python-Dev] Changing PYC-MagicM.-A. Lemburg mal@lemburg.com
Fri, 28 Apr 2000 20:57:18 +0200
I have just looked at the Python/import.c file and the
hard coded PYC magic number...

/* Magic word to reject .pyc files generated by other Python versions */
/* Change for each incompatible change */
/* The value of CR and LF is incorporated so if you ever read or write
   a .pyc file in text mode the magic number will be wrong; also, the
   Apple MPW compiler swaps their values, botching string constants */
/* XXX Perhaps the magic number should be frozen and a version field
   added to the .pyc file header? */
/* New way to come up with the magic number: (YEAR-1995), MONTH, DAY */
#define MAGIC (20121 | ((long)'\r'<<16) | ((long)'\n'<<24))

A bit outdated, I'd say. With the addition of Unicode, the
PYC files will contain marshalled Unicode objects which are
not readable by older versions. I'd suggest bumping the
magic number to 50428 ;-)

-- 
Marc-Andre Lemburg
______________________________________________________________________
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4