Commit 84b76498 authored by Giampaolo Rodola's avatar Giampaolo Rodola

Minor cosmetic enhancement to provide a more readable repr()esentation of Extension instances:

- <distutils.extension.Extension at 0x2b2088b79b00>
+ <distutils.extension.Extension('_struct') at 0x2b2088b79b00>
parent 3e3c0341
......@@ -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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment