VERSION = (0, 0, 3, 'alpha', 1)

def get_version(version=None):
	"""
	Returns a PEP 386-compliant version number from VERSION.
	"""
	
	main_version, sub_version = '', ''

	if version is None:
		version = VERSION
	else:
		assert len(version) == 5
		assert version[3] in ('alpha', 'beta', 'rc', 'final')
		

	parts = 2 if version[2] == 0 else 3
	main_version = '.'.join(str(x) for x in version[:parts])

	if version[3] != 'final':
		mapping = {'alpha': 'a', 'beta': 'b', 'rc': 'c'}
		sub_version = mapping[version[3]] + str(version[4])
	else:
		pass

	return str(main_version + sub_version)

def main():
	from __main__ import main
	main()
@@ -10,17 +10,17 @@
  (0, 0, 
-3
+4
 , 'alpha

Bump to 0.0.4a1