Skip to content

Conversation

cpcloud
Copy link
Member

@cpcloud cpcloud commented Aug 3, 2013

closes #4455.

@ghost ghost assigned cpcloud Aug 3, 2013
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jreback is this True here for a reason? It will have no effect on the return value of _is_sequence...

@cpcloud
Copy link
Member Author

cpcloud commented Aug 3, 2013

@jreback ok 2 merge?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would define something like compat.string_and_binary_types

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw - that only matters for python3 - bytes is str in py2
On Aug 3, 2013 1:47 PM, "Phillip Cloud" [email protected] wrote:

In pandas/core/common.py:

@@ -1612,9 +1612,9 @@ def is_list_like(arg):
def _is_sequence(x):
try:
iter(x)

  •    len(x) # it has a length
    
  •    return not isinstance(x, compat.string_types) and True
    
  • except Exception:
  •    len(x)  # it has a length
    
  •    return not isinstance(x, compat.string_types + (compat.binary_type,))
    

ok


Reply to this email directly or view it on GitHubhttps://github.com//pull/4456/files#r5567493
.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes but that's issue here...

@cpcloud
Copy link
Member Author

cpcloud commented Aug 3, 2013

think this is good 2 go now

@jreback
Copy link
Contributor

jreback commented Aug 3, 2013

ok

cpcloud added a commit that referenced this pull request Aug 3, 2013
BUG/OFMT: fix repring of python3 bytes objects
@cpcloud cpcloud merged commit 52712e2 into pandas-dev:master Aug 3, 2013
@cpcloud cpcloud deleted the fix-py3-bytes-repr branch August 3, 2013 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

awkward repring on python3 bytes types
3 participants