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

print, sprint enhancement for context, mime #33362

Closed
o314 opened this issue Sep 23, 2019 · 2 comments
Closed

print, sprint enhancement for context, mime #33362

o314 opened this issue Sep 23, 2019 · 2 comments
Labels
display and printing Aesthetics and correctness of printed representations of objects. speculative Whether the change will be implemented is speculative

Comments

@o314
Copy link
Contributor

o314 commented Sep 23, 2019

CLOSED SINCE IT WAS TOO BADLY EXPLAINED

Majors points were

  • sprint should be able to handle context as a pair, or a vector of pair (may be an union). may be this could be a kwargs splat
  • print should be able to handle a mime argument to pipeline to show(io, mime, x) and not only show(io, x). The whole text/$something mime class belongs to print as much as show. Separation is artificial
@o314 o314 changed the title sprint enhancement for context, mime print, sprint enhancement for context, mime Sep 23, 2019
@stevengj
Copy link
Member

stevengj commented Sep 24, 2019

print is explicitly for text output; I don't think it makes sense for it to accept a general MIME type. For context, there is always print(IOContext(stdout, ...), x), no?

For sprint, you can already do sprint(show, mimetype, x), as well as repr(mime, x), so I'm not sure why we need anything more as far as MIME types go?

@stevengj stevengj added display and printing Aesthetics and correctness of printed representations of objects. speculative Whether the change will be implemented is speculative labels Sep 24, 2019
@o314
Copy link
Contributor Author

o314 commented Oct 1, 2019

Sorry it is very hard to read, i will clean up and repost later if it is ok.

--
Blablabla comments has been removed.
Closed for now, will reopen it when analysis/proposition become complete and clear.

@o314 o314 closed this as completed Oct 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
display and printing Aesthetics and correctness of printed representations of objects. speculative Whether the change will be implemented is speculative
Projects
None yet
Development

No branches or pull requests

2 participants