edgedb / edgedb-python

The official Python client library for EdgeDB
https://edgedb.com
Apache License 2.0
369 stars 45 forks source link

Expose link properties in Object? #378

Closed msullivan closed 2 years ago

msullivan commented 2 years ago

Currently we pretty print link properties on objects, but the only way to actually access them seems to be by getting a Link object instead, which you do by using indexing (obj['link']) instead of dot notation (obj.link).

That all seems pretty arcane and annoying for the user.

I think we should probably expose link properties via indexing (obj['@lprop']) and/or a get_linkprop method. (We could also support getattr(obj, '@lprop'), but that's a little weirder)

fantix commented 2 years ago

Fixed in #379