[Doc-SIG] bdb.Bdb.canonic() -- What "stripped of surrounding angle brackets" means?
INADA Naoki
songofacandy at gmail.com
Thu Sep 2 08:24:34 CEST 2010
Hi, all.
on http://docs.python.org/library/bdb.html
canonic(filename)
Auxiliary method for getting a filename in a canonical form, that
is, as a case-normalized
(on case-insensitive filesystems) absolute path, stripped of
surrounding angle brackets.
Is " stripped of surrounding angle brackets." means it removes "<" on
left end and ">" on right end?
In the code:
def canonic(self, filename):
if filename == "<" + filename[1:-1] + ">":
return filename
canonic = self.fncache.get(filename)
if not canonic:
canonic = os.path.abspath(filename)
canonic = os.path.normcase(canonic)
self.fncache[filename] = canonic
return canonic
canonic() doesn't remove "<" and ">".
--
INADA Naoki <songofacandy at gmail.com>
More information about the Doc-SIG
mailing list