[BUG] transport/memory.py doesn't handle strings
Aaron Bentley
aaron.bentley at utoronto.ca
Wed Oct 19 06:49:38 BST 2005
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robert Collins wrote:
> Because for f in 'hello' -> h,e,l,l,o
> for f in ['hel', 'lo'] -> hel, lo
> for f in StringIO('hello') -> 'hello'
Yeah, but
for f in 'hello':
outf.write(f)
has the same results as
for f in ['hel', 'lo']:
outf.write(f)
has the same results as
for f in StringIO('hello'):
outf.write(f)
In all cases, when you're done looping, you've written 'hello' to outf.
The number of steps it takes isn't hugely relevant.
>
> They are behaving differently. Its interesting that they are all
> iterable, but not really relevant.
They are producing the same results. I never said they were calling the
same operations with the same parameters.
>>There should be a test for transport.base != transport.clone('a').base.
>
>
> Does that mean the branch open_containing code is broken ?
It looked fine last I checked. It was iterating up to the root, and
stopping there. If you substituted transport('a') for transport('..')
in that loop, I'd expect it to be infinite.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDVd5x0F+nu1YWqI0RAr3AAJ9CJCLuUiK6XMSV0TxfQfcSYMv3VgCeJ61Z
EgMRiF1IS6NdVBgeJ0bRPHk=
=mw0o
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list