Skip to content

Why would Record don't support dot notation? #38

Closed

Description

@imbolc
No description provided.

Activity

  1. elprans commented on Oct 31, 2016

    @elprans
    Member

    See #13 for the rationale of why this is not a good idea.

  2. imbolc commented on Oct 31, 2016

    @imbolc
    Author

    The reasons look good at the first glance. But sometimes people are already working with Record in dot notation. E.g. jinja or django templates allow to do this. And so people forced to use different syntax in their handlers and templates.

  3. elprans commented on Oct 31, 2016

    @elprans
    Member

    Both Jinja and Django allow dot notation for getitem access, so this argument is invalid.

  4. imbolc commented on Oct 31, 2016

    @imbolc
    Author

    Yes, sure. In django views you should use record as a dict, but in templates you should use dot notation. I would prefer use dot notation in both cases.

  5. elprans commented on Oct 31, 2016

    @elprans
    Member

    That's understandable. One potential solution is to add the ability to specify a cursor factory, like psycopg does. I'll open a separate issue for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions