Staging
v0.5.1
https://github.com/python/cpython
Revision 2e6cc334aa9175b090ae97691e7d4f5d46a87a42 authored by Michael W. Hudson on 16 March 2002, 18:01:05 UTC, committed by Michael W. Hudson on 16 March 2002, 18:01:05 UTC
backport montanaro's checkin of
    revision 1.24 of calendar.py

make _localized_name instances work more like the tuples they replaced.  In
particular, negative indexes work and they are limited by the actual length
of the names they represent (weekday and month names).  This closes bug
#503202.

[and then]

Corrected _localized_name.__getitem__ based on code in patch 503202 (which I
thought was just a bug report, so didn't notice - doh!).  This handles
slicing, which v 1.23 didn't.
1 parent 023db77
Raw File
Tip revision: 2e6cc334aa9175b090ae97691e7d4f5d46a87a42 authored by Michael W. Hudson on 16 March 2002, 18:01:05 UTC
This checkin backport two checkins by Skip.
Tip revision: 2e6cc33
getbuildinfo.c
#include "Python.h"

#ifdef macintosh
#include "macbuildno.h"
#endif

#ifndef DONT_HAVE_STDIO_H
#include <stdio.h>
#endif

#ifndef DATE
#ifdef __DATE__
#define DATE __DATE__
#else
#define DATE "xx/xx/xx"
#endif
#endif

#ifndef TIME
#ifdef __TIME__
#define TIME __TIME__
#else
#define TIME "xx:xx:xx"
#endif
#endif

#ifndef BUILD
#define BUILD 0
#endif


const char *
Py_GetBuildInfo(void)
{
	static char buildinfo[50];
	PyOS_snprintf(buildinfo, sizeof(buildinfo),
		      "#%d, %.20s, %.9s", BUILD, DATE, TIME);
	return buildinfo;
}
back to top