[issue17499] inspect.Signature and inspect.Parameter objects are mutable

2013-03-20 Thread Larry Hastings
Larry Hastings added the comment: Yes, it seems I've been living in a fool's paradise, happy and ignorant. I thought that the behavior of garden-variety "immutable" objects was like tuple, where the implementor shored up the interface and the saboteur had to work *really* hard to modify the c

[issue17499] inspect.Signature and inspect.Parameter objects are mutable

2013-03-20 Thread R. David Murray
R. David Murray added the comment: "BUT THE INTERNAL MEMBER IS EXTERNALLY MUTABLE." Your point being? This is Python, the consenting adults language :). -- nosy: +r.david.murray resolution: -> invalid stage: test needed -> committed/rejected status: open -> pending __

[issue17499] inspect.Signature and inspect.Parameter objects are mutable

2013-03-20 Thread Brett Cannon
Brett Cannon added the comment: So what do you propose as a solution? Do you want to subclass tuple and then override __getitem__() so they can't index into the underlying tuple? Use __mangled names? I mean if people are going to break the API to muck with stuff we can't stop them (nor can th

[issue17499] inspect.Signature and inspect.Parameter objects are mutable

2013-03-20 Thread Larry Hastings
New submission from Larry Hastings: The documentation for Inspect.Signature and Inspect.Parameter states that the objects are immutable. And they go to great lengths to provide a convenient interface allowing you to "replace" members. However, the objects make only a pathetic effort at being