Minor cosmetic enhancement to provide a more readable repr()esentation of Extension instances:
- <distutils.extension.Extension at 0x2b2088b79b00> + <distutils.extension.Extension('_struct') at 0x2b2088b79b00>
This commit is contained in:
parent
d43bf79b5e
commit
4a692ce5ec
|
@ -131,6 +131,14 @@ class Extension:
|
|||
msg = "Unknown Extension options: %s" % options
|
||||
warnings.warn(msg)
|
||||
|
||||
def __repr__(self):
|
||||
return '<%s.%s(%r) at %#x>' % (
|
||||
self.__class__.__module__,
|
||||
self.__class__.__name__,
|
||||
self.name,
|
||||
id(self))
|
||||
|
||||
|
||||
def read_setup_file(filename):
|
||||
"""Reads a Setup file and returns Extension instances."""
|
||||
from distutils.sysconfig import (parse_makefile, expand_makefile_vars,
|
||||
|
|
Loading…
Reference in New Issue