home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 29585914

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
29585914 MDU6SXNzdWUyOTU4NTkxNA== 75 Switch to using dict instead of OrderedDict for variables and attributes? 1217238 closed 0     2 2014-03-17T18:24:14Z 2016-08-07T23:02:25Z 2014-04-25T22:32:31Z MEMBER      

My analysis:

Positives: - dict is more "pythonic": - dict is faster - dict comes with syntax built into the language: {} - repr() on a dict is more readable: {'x': 0, 'y': 1} vs OrderedDict([('x', 0), ('y', 1)]). - Using dict would make it simpler to implement new features in xray, because we don't need to spend time thinking about the order of items. It would also let us simplify some existing features. - We already don't check order for dataset or variable equality. Switching to dict would better align our internal data model with this fact. - It would be very poor form to write code that relies on attribute or variable order. We shouldn't provide this trap for users.

Neutral: - xray would still serialize data consistently, because the order of elements in a dictionary is (mostly) fixed by the Python implementation.

Negatives: - Users expect xray to write netCDFs that look exactly like the ones it reads. I am opposed to adding a separate encoding attribute for datasets unless absolutely necessary, so this is only way sane to keep track of variable/attribute order.

Your thoughts?

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/75/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 1 row from issues_id in issues_labels
  • 2 rows from issue in issue_comments
Powered by Datasette · Queries took 158.703ms · About: xarray-datasette