Avro
  1. Avro
  2. AVRO-215

Add docstring indicating utility of "seen" parameter to __hash__ and __eq__ in schema.py and explore use of decorators for memoization

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: python
    • Labels:
      None

      Description

      As pointed out by Doug on the mailing list, the point of the "seen" parameter is to "contain the set of schemas that are on the stack. Schemas can be circular, so this is required to prevent infinite loops."

        Activity

        Hide
        Jeff Hammerbacher added a comment -

        Note also that memoization is a common use of decorators, and decorators are available in Python 2.4+. If we're comfortable requiring Python 2.4 (seems reasonable to me), we can explore the use decorators here.

        Show
        Jeff Hammerbacher added a comment - Note also that memoization is a common use of decorators, and decorators are available in Python 2.4+. If we're comfortable requiring Python 2.4 (seems reasonable to me), we can explore the use decorators here.
        Hide
        Jeff Hammerbacher added a comment -

        Moot point with AVRO-219

        Show
        Jeff Hammerbacher added a comment - Moot point with AVRO-219

          People

          • Assignee:
            Jeff Hammerbacher
            Reporter:
            Jeff Hammerbacher
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development