You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/10/12 17:22:39 UTC

[GitHub] [beam] tvalentyn commented on a change in pull request #15667: [BEAM-12730] Add custom delimiters to Python TextIO reads

tvalentyn commented on a change in pull request #15667:
URL: https://github.com/apache/beam/pull/15667#discussion_r727346468



##########
File path: sdks/python/apache_beam/io/textio.py
##########
@@ -561,6 +570,7 @@ def __init__(
         skipped from each source file. Must be 0 or higher. Large number of
         skipped lines might impact performance.
       coder (~apache_beam.coders.coders.Coder): Coder used to decode each line.
+      delimiter (str or bytes): delimiter to split records

Review comment:
       APIs that accept both strings and bytes in the same parameter are strongly discouraged, see, for example: docs.python.org/3/howto/unicode.html#tips-for-writing-unicode-aware-programs.
   @dmitriikuzinepam would you mind sending a follow-up change to make custom delimiter always bytes and removing the branching in the code?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org