Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OrderedDict #2

Open
femtotrader opened this issue Aug 25, 2015 · 0 comments
Open

OrderedDict #2

femtotrader opened this issue Aug 25, 2015 · 0 comments

Comments

@femtotrader
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant