Skip to content

OrderedDict #2

Description

@femtotrader

Hello,

I'm looking at your code

dp = collections.OrderedDict({
    'name': '',
    'license': [{
        'name': 'Public Domain Dedication and License',
        'url': 'http://opendatacommons.org/licenses/pddl/1.0/'
    }]
})
dp['resources'] = [
        {
            'schema': { 'fields': fields }
        }
    ]

won't preserve order

it might be

dp = collections.OrderedDict([ 
    ('name', ''), 
    ('license', collections.OrderedDict([
        ('name', 'Public Domain Dedication and License'), 
        ('url', 'http://opendatacommons.org/licenses/pddl/1.0/')
    ])),
    ('resources', {'schema': { 'fields': fields }})
])

Kind regard

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions