简体   繁体   English

无法在Pydev中的文本内创建带有“ @”符号的字符串

[英]Cannot create a string with “@” symbol inside the text in Pydev

I'm trying to create a simple string like: 我正在尝试创建一个简单的字符串,如:

test = "abc@email.com" in Pydev but it automatically interpret "@" as a special symbol and the statement cannot pe done. test = "abc@email.com" ,但它会自动将"@"解释为特殊符号,并且该语句无法执行。 When I focus on the variable in Pydev, I can see: test = "abc* @email.com" * instead of test = "abc@email.com" 当我关注Pydev中的变量时,可以看到:test =“ abc * @ email.com” *而不是test = "abc@email.com"

Anyone has any idea why I have this issue? 有人知道为什么会有这个问题吗?

If I run the statement in windows command prompt python, then it is correctly assigned. 如果我在Windows命令提示符python中运行该语句,则它已正确分配。

Does it have any relation with pylint? 它与pylint有关系吗?

Thanks, 谢谢,

The only way I was able to reproduce similar result was with unclosed string before that, which is obviously a syntax error. 我能够重现类似结果的唯一方法是在此之前使用未封闭的字符串,这显然是语法错误。 Otherwise I've never seen any problems with string literals containing @ while using PyDev (with PyLint). 否则,在使用PyDev(与PyLint)时,我从未见过包含@字符串文字有任何问题。

在此处输入图片说明

try %@ ? 尝试%@吗?

this might be your answer. 这可能是您的答案。 Not a whole lot out there about special characters in python. 关于python中的特殊字符没有很多。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM