glob.glob unicode bug or feature

From: Elbert Lev (elbertlev_at_hotmail.com)
Date: 07/31/04


Date: 31 Jul 2004 08:12:50 -0700


#Here is the script
#Python 2.3 on W2K

import glob

name = glob.glob(u"./*.mp3")[0]
print type(name)
name = glob.glob(u"*.mp3")[0]
print type(name)

##OUTPUT##
#<type 'unicode'>
#<type 'str'>

#Is this a bug, or a feature? I beleve it's a bug.



Relevant Pages

  • Re: [glob -tails] broken in respect to tilde-filenames!
    ... I recommend not doing that;). ... > report the bug to. ... The last time this was reported it was decided it was not a bug. ... must prepend './' when trying to pass the return values of 'glob' to ...
    (comp.lang.tcl)
  • Re: Perl 5.8.0 foreach & glob BUG
    ... > of values for use in a glob() function, then globreturns an empty string ... > for every odd array index. ... In all my years of Perl ... > really does seem like a bug, ...
    (comp.lang.perl.misc)
  • 8.5 glob bug !?
    ... that looks like a bug in ActiveTcl 8.5.0.0.121397 ... does not return any matches on subdirectories of network shares. ...
    (comp.lang.tcl)
  • Re: BUG or FEATURE
    ... needs to prove that "See this seems to be a bug to me - I am typical ... and no where it is mentioned that the feature should work like this". ... lack of knowledge that "there is no Oracle". ... which ones (does management think) are the most ...
    (comp.software.testing)
  • Re: BUG or FEATURE
    ... 10x two all for replay. ... work better/easier will be a feature and not bug. ... goes to oracle. ...
    (comp.software.testing)