+1 for closing the JIRA if we can't find the interesting use case...
For me, an implicit `__len__` would be more confusing than using
`str()` and getting the length.

All my best, Ryan

On Thu, Nov 21, 2019 at 3:47 AM Michael A. Smith <[email protected]> wrote:
>
> We could define the length of a schema as e.g. the length of the
> parsing canonical form, but I'm just not that convinced there's value
> here. I'm inclined to close this issue.
>
> On Thu, Nov 7, 2019 at 4:06 AM Ryan Skraba <[email protected]> wrote:
> >
> > I think you're correct: as written, the JIRA doesn't have a lot of sense.
> >
> > Does the BSON example imply that it would be useful to get the Avro
> > length of a datum given a schema?
> >
> > Roughly: `len(my_schema.from_datum({"hello": "world"})) == 22` ?  It
> > doesn't seem quite right either!
> >
> >
> > On Wed, Nov 6, 2019 at 3:36 AM Michael A. Smith <[email protected]> 
> > wrote:
> > >
> > > AVRO-239 asks for an implementation of `__len__` in Python's
> > > implementation of avro schema. It points to BSON as an example, but I
> > > don't really understand what the ask is -- what's the purpose of
> > > having a "length" of a schema, and what would it mean? If schema had a
> > > consistent length, how could users benefit from it?
> > >
> > > Thanks,
> > > Michael A. Smith

Reply via email to