Refactor sshconfig #378

Closed
wants to merge 3 commits into
from

Projects

None yet

3 participants

@lndbrg
Contributor
lndbrg commented Aug 19, 2014

Be more pythonic.

lndbrg added some commits Aug 19, 2014
@lndbrg lndbrg Be more pythonic in emptiness and comment check. ded42b8
@lndbrg lndbrg Use [key] = value syntax rather than .update().
This brings the code more inline with the code around it.
2370f0b
@lndbrg lndbrg Change signature to (haystack, needle).
This brings the code more inline with the code around it and also
the python stdlib in general.
3e94fc8
@coveralls

Coverage Status

Coverage increased (+0.05%) when pulling 3e94fc8 on lndbrg:refactor-sshconfig into d8a71fc on paramiko:master.

@bitprophet
Member

The change to _allowed doesn't seem clearly better or worse. Is there an idiom I'm missing re: why func(list_arg, single_value-arg) is better than the inverse?

@lndbrg
Contributor
lndbrg commented Aug 26, 2014

It's for consistency's sake. Both the code around it and Python's stdlib
usually takes the haystack before the needle. It's an underscore method so
it shouldn't be used by any other code anyway.
On Aug 26, 2014 1:33 AM, "Jeff Forcier" notifications@github.com wrote:

The change to _allowed doesn't seem clearly better or worse. Is there an
idiom I'm missing re: why func(list_arg, single_value-arg) is better than
the inverse?


Reply to this email directly or view it on GitHub
#378 (comment).

@bitprophet
Member

That's fair, thanks :)

@bitprophet
Member

Looks like it can't be automerged and I kinda wanted it have it back in older branch lines anyway, so I will manually apply.

@bitprophet bitprophet added a commit that referenced this pull request Aug 26, 2014
@bitprophet bitprophet Backport #378 to 1.13, closes #378 b641c69
@bitprophet bitprophet added a commit that closed this pull request Aug 26, 2014
@bitprophet bitprophet Backport #378 to 1.13, closes #378 b641c69
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment