On Sep 9, 2014, at 7:50 PM, Wolfgang Rohdewald <wolfgang....@rohdewald.de>
wrote:
> doc says:
>
> Instance: s is an instance of UserString.UserString, with a __dict__
> {'data': 'hello'}::
> [\"UserString.UserString\", ['dictionary', ['data', 'hello']]]
>
> There is no test for instances. To be precise, no test ever enters
> jelly._unjelly_instance()
>
> I also cannot find any place in jelly.py where an Instance would
> be jellied. There is
>
> instance_atom = 'instance'
>
> but instance_atom is not used anywhere.
>
> Is this outdated code? If not, could you please give me a code
> example using this?
PB was developed during a period of far less rigorous development practices for
Twisted. Particularly, we didn't do test-driven development.
It's quite possible that this code was never used.
Most likely I looked at the Python type system when originally developing PB
and thought that I'd want to jelly types.InstanceType, then thought the better
of it because types should be types and InstanceType was a wart (which
python-dev apparently agreed with since it is gone from the new-style object
model).
I imagine the thing to do with this is simply deprecate->remove, if it's
already unused. It's certainly not something we'd want to resurrect.
Thanks,
-glyph
_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python