Using fixed variables probably doesn't help

John Arbash Meinel john at
Fri Jun 16 15:05:56 BST 2006

Hash: SHA1

Robert Collins wrote:
> On Fri, 2006-06-16 at 08:53 -0500, John Arbash Meinel wrote:
>> I'm fine with the clarity aspect. But if you want to do that, we
>> probably should promote 'osutils._directory_kind' to being public, and
>> add file_kind and symlink_kind. I don't think we need ones for stuff
>> like 'socket'. 
> Agreed with the promotion. I dont see any harm in having socket_kind
> public - and if we use it more than once as a literal, lets make the
> symbol public.
> Rob

As far as I know we don't. And if you do socket, do you also do fifo,
chardev, and block? They just don't seem very useful to me. I would
promote unknown_kind = 'unknown', especially since you'll want to use
that in your 'read_dirs' changes. (Can you call intern() in pyrex to
make sure that you are using the interned version?)

We also could do that for all of the kinds. So we would end up with:

file_kind = intern('file')
directory_kind = intern('directory')
symlink_kind = intern('symlink')
unknown_kind = intern('unknown')

and if you want
block_kind = intern('block')

While its true that Python will intern them automatically (at least
right now), it does make it explicit that we want the interned copy of
those strings.


Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla -


More information about the bazaar mailing list