Skip to content

Namedtuples? #37

Description

@javadba

When trying to use a namedtuple the attributes are not matching up:

Original:

Arg = ntup('Arg','name nix gnu help default action',defaults=(None,)*6)

for arg in args:
  parser.add_argument(arg.nix, arg.gnu, action='store', help=arg.help, default=arg.default)

Obfsucated:

l1l111l_opy_ = namedtuple(l1ll1ll_opy_ (u"ࠫࡆࡸࡧࠨࡩ"),l1ll1ll_opy_ (u"ࠬࡴࡡ࡮ࡧࠣࡲ࡮ࡾࠠࡨࡰࡸࠤ࡭࡫࡬ࡱࠢࡧࡩ࡫ࡧࡵ࡭ࡶࠣࡥࡨࡺࡩࡰࡰࠪࡪ"),defaults=(None,)*6)

for arg in args:
  parser.add_argument(arg.l11111l_opy_, arg.l1llll1l1_opy_, action=l1ll1ll_opy_ (u"ࠧࡴࡶࡲࡶࡪ࠭ࡺ"), help=arg.help, default=arg.default)

Result:

AttributeError: 'Arg' object has no attribute 'l11111l_opy_'

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