{"action":"created","issue":{"url":"https://api.github.com/repos/labuboco/River-Land/issues/3","repository_url":"https://api.github.com/repos/labuboco/River-Land","labels_url":"https://api.github.com/repos/labuboco/River-Land/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/labuboco/River-Land/issues/3/comments","events_url":"https://api.github.com/repos/labuboco/River-Land/issues/3/events","html_url":"https://github.com/labuboco/River-Land/issues/3","id":267089289,"number":3,"title":"Python-运算符","user":{"login":"labuboco","id":17706128,"avatar_url":"https://avatars0.githubusercontent.com/u/17706128?v=4","gravatar_id":"","url":"https://api.github.com/users/labuboco","html_url":"https://github.com/labuboco","followers_url":"https://api.github.com/users/labuboco/followers","following_url":"https://api.github.com/users/labuboco/following{/other_user}","gists_url":"https://api.github.com/users/labuboco/gists{/gist_id}","starred_url":"https://api.github.com/users/labuboco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/labuboco/subscriptions","organizations_url":"https://api.github.com/users/labuboco/orgs","repos_url":"https://api.github.com/users/labuboco/repos","events_url":"https://api.github.com/users/labuboco/events{/privacy}","received_events_url":"https://api.github.com/users/labuboco/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-10-20T07:41:29Z","updated_at":"2017-11-21T06:47:57Z","closed_at":null,"author_association":"OWNER","body":"& （按位与）\r\n对数字进行按位与操作。\r\n5 & 3 输出 1 。\r\n| （按位或）\r\n对数字进行按位或操作。\r\n5 | 3 输出 7 。\r\n^ （按位异或）\r\n对数字进行按位异或操作。\r\n5 ^ 3 输出 6 。\r\n~ （按位取反）\r\nx 的按位取反结果为 -(x+1)。\r\n~5 输出 -6 。有关本例的更多细节可以参\r\n阅：http://stackoverflow.com/a/11810203 。\r\n\r\n< （小于）\r\n返回 x 是否小于 y。**所有的比较运算符返回的结果均为 True 或 False**。\r\n请注意这些名称之中的大写字母。\r\n5 < 3 输出 False ， 3 < 6 输出 True 。\r\n比较可以任意组成组成链接： 3 < 5 < 7 返回 True 。\r\n\\> （大于）\r\n返回 x 是否大于 y。\r\n5 > 3 返回 True 。如果两个操作数均为数字，它们首先将会被转换至一种共同的\r\n类型。否则，它将总是返回 False 。\r\n<= （小于等于）\r\n返回 x 是否小于或等于 y。\r\nx = 3; y = 6; x<=y 返回 True 。\r\n\\>= （大于等于）\r\n返回 x 是否大于或等于 y。\r\nx = 4; y = 3; x>=3 返回 True 。\r\n== （等于）\r\n比较两个对象是否相等。\r\nx = 2; y = 2; x == y 返回 True 。\r\nx = 'str'; y = 'stR'; x == y 返回 False 。\r\nx = 'str'; y = 'str'; x == y 返回 True 。\r\n!= （不等于）\r\n比较两个对象是否不相等。\r\nx = 2; y = 3; x != y 返回 True 。\r\n\r\nnot （布尔“非”）\r\n如果 x 是 Ture ，则返回 False 。如果 x 是 False ，则返回 True 。\r\nx = Ture; not x 返回 False 。\r\n**and （布尔“与”）**\r\n如果 x 是 False ，则 x and y 返回 False ，否则返回 y 的计算值。\r\n当 x 是 False 时， x = False; y = True; x and y 将返回 False 。在这一情境中，\r\nPython 将不会计算 y，因为它已经了解 and 表达式的左侧是 False ，这意味着整个\r\n表达式都将是 False 而不会是别的值。这种情况被称作**短路计算**（Short-circuit\r\nEvaluation）。\r\n**or （布尔“或”）**\r\n如果 x 是 True ，则返回 True ，否则它将返回 y 的计算值。\r\nx = Ture; y = False; x or y 将返回 Ture 。在这里短路计算同样适用。"},"comment":{"url":"https://api.github.com/repos/labuboco/River-Land/issues/comments/345932929","html_url":"https://github.com/labuboco/River-Land/issues/3#issuecomment-345932929","issue_url":"https://api.github.com/repos/labuboco/River-Land/issues/3","id":345932929,"user":{"login":"labuboco","id":17706128,"avatar_url":"https://avatars0.githubusercontent.com/u/17706128?v=4","gravatar_id":"","url":"https://api.github.com/users/labuboco","html_url":"https://github.com/labuboco","followers_url":"https://api.github.com/users/labuboco/followers","following_url":"https://api.github.com/users/labuboco/following{/other_user}","gists_url":"https://api.github.com/users/labuboco/gists{/gist_id}","starred_url":"https://api.github.com/users/labuboco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/labuboco/subscriptions","organizations_url":"https://api.github.com/users/labuboco/orgs","repos_url":"https://api.github.com/users/labuboco/repos","events_url":"https://api.github.com/users/labuboco/events{/privacy}","received_events_url":"https://api.github.com/users/labuboco/received_events","type":"User","site_admin":false},"created_at":"2017-11-21T06:47:57Z","updated_at":"2017-11-21T06:47:57Z","author_association":"OWNER","body":"正则表达式\r\n符号匹配\r\n```\r\n. (dot) 任意单一字符\r\n\\d 任意一位数字\r\n[A‐Z] A 到 Z中任意一个字符（大写）\r\n[a‐z] a 到 z中任意一个字符（小写）\r\n[A‐Za‐z] a 到 z中任意一个字符（不区分大小写）\r\n+ 匹配一个或更多 (例如, \\d+ 匹配一个或 多个数字字符)\r\n[^/]+ 一个或多个不为‘/’的字符\r\n? 零个或一个之前的表达式（例如：\\d? 匹配零个或一个数字）\r\n* 匹配0个或更多 (例如, \\d* 匹配0个 或更多数字字符)\r\n{1,3} 介于一个和三个（包含）之前的表达式（例如，\\d{1,3}匹配一个或两个或三个数字）\r\n```"}}
{"actor":{"display_login":"labuboco"}}