[rb-general] Addresses in (I)Python output
Daniel Shahaf
danielsh at apache.org
Thu Sep 26 21:48:11 UTC 2019
Daniel Shahaf wrote on Thu, 26 Sep 2019 21:26 +00:00:
> Chris Lamb wrote on Thu, 26 Sep 2019 09:06 +00:00:
> > Daniel Shahaf wrote:
> >
> > > > Indeed, but I'm not sure we were really suggesting that we normalise
> > > > all "\b0x[0-9a-z]+\b", rather that we patch the "repr"-like routine
> > > > which would not have any affect on the above.
> > >
> > > That's my understanding too, but my point stands.
> >
> > I suspect that we are talking at cross-purposes here as what is in my
> > head would not affect the result of the "o == o2" predicate, etc.
>
> The documentation source would say:
>
> >>> o
> <cls.C object at 0x42>
> >>> o2
> <cls.C object at 0x43>
>
> The documentation, after stripping hex addresses, would say:
>
> >>> o
> <cls.C object>
> >>> o2
> <cls.C object>
>
> Thus, stripping hex addresses from repr() output would lose information.
To be explicit: I'm referring here to the output of the documentation
build process; the information lost is the detail that «o is not o2»,
even though they compare equal (in the example),.
More information about the rb-general
mailing list