Skip to content
This repository has been archived by the owner on May 31, 2020. It is now read-only.

support for kwargs splat operator #581

Open
jstoebel opened this issue Jun 26, 2017 · 3 comments
Open

support for kwargs splat operator #581

jstoebel opened this issue Jun 26, 2017 · 3 comments

Comments

@jstoebel
Copy link
Contributor

jstoebel commented Jun 26, 2017

If I enter this expression into the test bed:

        coord = {'latitude': '37.24N', 'longitude': '-115.81W'}
        print('Coordinates: {latitude}, {longitude}'.format(**coord))

and then have the format method console.log the kwargs passed in, I get:

 PyObject {
   data_keys:
    [ 'mask',
      { __hash__: [Function: __hash__], __eq__: [Function: __eq__] },
      { __hash__: [Function: __hash__], __eq__: [Function: __eq__] },
      { __hash__: [Function: __hash__], __eq__: [Function: __eq__] },
      { __hash__: [Function: __hash__], __eq__: [Function: __eq__] },
      'data_keys',
      'data_values',
      'size' ],
   data_values:
    [ 7,
      ,
      ,
      ,
      ,
      [ [Object],
        [Object],
        [Object],
        [Object],
        [Object],
        'latitude',
        'longitude',
        [Object] ],
      [ , , , , , '37.24N', '115.81W',  ],
      2 ],
   size: 4,
   mask: 7 }

It looks like the dict isn't structured as expected. If I pass the keys longitude and latitude in as explicit keyword arguments, they are parsed as expected. It looks like the splat operator is the issue, but I could be wrong.

@Souldiv
Copy link

Souldiv commented Feb 22, 2018

can you tell me the steps to reproduce this issue?

@jstoebel
Copy link
Contributor Author

Hi @Souldiv This issue is several months old and may have been addressed by now. @freakboy3742 does Batavia support this now?

@freakboy3742
Copy link
Member

@jstoebel It does, but only in a branch that hasn't landed yet. I'm trying to nail down the last couple of issues with that patch, but once I have, the whole function calling and dispatch code will be a lot cleaner.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants