-
Notifications
You must be signed in to change notification settings - Fork 132
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
关键字冲突 #104
Comments
Hey @dakezuo, any chance you could type this in English? From what I can tell from google translate, I think you're asking about using built in names with the dot syntax. This won't work! You can not use the dot syntax for keys that collide with builtins. You would have to use the getitem syntax instead e.g. |
@mewwts Yes, that's exactly what I'm doing right now, and I'm wondering if there's a way to identify these system keywords internally and make an escape substitution in string form to allow the outside world to continue implementing a bit of syntax, which of course is just a suggestion, because I'm new to python, so I don't know if it's possible |
Hey @dakezuo - thanks for commenting! I won't say it's impossible, but I'm not sure it's something I'd like to do, unfortunately. What's your specific usecase for this? |
@mewwts I've only recently used it, and I happen to encounter this return in a request. |
Right, so you're using addict with arbitrary returns from http request is that so, @dakezuo? |
@mewwts Yes, the key and keyword of the field returned by the server coincidentally are duplicated in the HTTP return |
@dakezuo I would fetch data residing on keys corresponding to builtin keywords using the |
当我使用图灵机器人时,在返回值中有字段与内建函数名重复,这时使用点语法会报错,请问该如何避免呢
The text was updated successfully, but these errors were encountered: