Git Product home page Git Product logo

Comments (4)

lazka avatar lazka commented on June 4, 2024

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


From [email protected] on January 08, 2010 15:20:33

In fact my idea was so good I implemented it months ago. The current EasyID3 module
raises a subclass of KeyError and ValueError, and mutagen.id3.error, for all the
reasons described above.

Status: Invalid

from mutagen.

lazka avatar lazka commented on June 4, 2024

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


From [email protected] on January 08, 2010 15:16:19

Status: Accepted

from mutagen.

lazka avatar lazka commented on June 4, 2024

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


From [email protected] on January 06, 2010 08:52:50

I think __getitem__ (and __delitem__) should never be raising a ValueError. A missing
key and an unsupported key are identical from the perspective of the getter, since an
unsupported key is always missing.

setitem should probably throw a custom subclass of both KeyError and ValueError,
for compatibility.

from mutagen.

lazka avatar lazka commented on June 4, 2024

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


From [email protected] on January 05, 2010 20:01:40

What you propose would make it nearly impossible for a program to determine if a key
was rejected for being missing or for being unsupported. Support varies for keys
across different versions of mutagen.

The current state of play is...

KeyError indicates data not present (read).
ValueError indicates feature not present (read/write).

from mutagen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.