Repository navigation
Conversation
|
ready for review. Until review comments are seen, the changes from here on will be only for codacy/ruff and other minor modifications as needed. |
MartinFlores751
left a comment
There was a problem hiding this comment.
Code is looking good to me, only have one suggestion. Learned about the := operator.
| # Set a number of metadata AVUs with the iRODSMeta builder invocation. (Each of | ||
| # these AVU values follow a predictable relation defined by the test_mapping function.) | ||
| def test_mapping(name): return str(ord(name)) | ||
| avu_names = [chr(_) for _ in range(ord('a'), ord('z')+1)] |
There was a problem hiding this comment.
Style question. Is it preferable to use _ here? I thought _ was equivalent to "discard this result" and was a bit surprised to see it work.
There was a problem hiding this comment.
_ is a valid dummy variable name, so our tools like it better than having a meaningfule variable like loopVariable because, you know, namespace pollution. Of course it's also true as of Python 3.x that list comprehension temporaries do not leak outward, so ... really we can choose anything.
_ , in the interpreter, means "last result". Other than that , I don't think there's any special meaning....
There was a problem hiding this comment.
Style question. Is it preferable to use
_here? I thought_was equivalent to "discard this result" and was a bit surprised to see it work.
now that I look at it though, [ letter for letter in string.ascii_lowercase ] might be more self-documenting - ?
There was a problem hiding this comment.
_ is a valid dummy variable name, so our tools like it better than having a meaningfule variable like
loopVariablebecause, you know, namespace pollution. Of course it's also true as of Python 3.x that list comprehension temporaries do not leak outward, so ... really we can choose anything.
_, in the interpreter, means "last result". Other than that , I don't think there's any special meaning....
Learned a lot about how _ is treated and scoping behavior here. Thanks for the info!
Style question. Is it preferable to use
_here? I thought_was equivalent to "discard this result" and was a bit surprised to see it work.now that I look at it though, [ letter for letter in string.ascii_lowercase ] might be more self-documenting - ?
Definitely like self-documenting code. If you think it'll help future readers, I'd change _ to letter.
No description provided.