#15 make Values behave like a real dict

closed
5
2006-06-13
2005-01-10
No

It would be nice if Values were to behave like a real dict.

You cannot use it as such, "%(whatever)s" fails because
Values has not __getitem__, and dict() fails because
it's not a sequence.

Discussion

  • Greg Ward

    Greg Ward - 2006-06-13

    Logged In: YES
    user_id=14422

    Why can't you just use vars()? E.g.

    (options, args) = parser.parse_args()
    print "you supplied --foo=%(foo)s, --bar=%(bar)s" \ % vars(options)

     
  • Greg Ward

    Greg Ward - 2006-06-13
    • labels: --> misc features
    • assigned_to: nobody --> gward
    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks