{"id":81319,"date":"2023-10-28T22:00:05","date_gmt":"2023-10-28T14:00:05","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=81319"},"modified":"2023-10-28T22:00:05","modified_gmt":"2023-10-28T14:00:05","slug":"python-misunderstanding","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/python-misunderstanding.html","title":{"rendered":"python\u5b66\u4e60\u8bef\u533a\u603b\u7ed3"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u4e3a\u4e86\u8ba9\u521d\u5b66 Python \u7684\u7a0b\u5e8f\u5458\u907f\u514d\u72af\u540c\u6837\u7684\u9519\u8bef\uff0c\u4ee5\u4e0b\u5217\u51fa\u4e86\u6211\u5b66\u4e60 Python \u65f6\u72af\u7684\u4e09\u79cd\u9519\u8bef\u3002\u8fd9\u4e9b\u9519\u8bef\u8981\u4e48\u662f\u6211\u957f\u671f\u4ee5\u6765\u7ecf\u5e38\u72af\u7684\uff0c\u8981\u4e48\u662f\u9020\u6210\u4e86\u9700\u8981\u51e0\u4e2a\u5c0f\u65f6\u89e3\u51b3\u7684\u9ebb\u70e6\u3002 \u5e74\u8f7b\u7684\u7a0b\u5e8f\u5458\u4eec\u53ef\u8981\u6ce8\u610f\u4e86\uff0c\u8fd9\u4e9b\u9519\u8bef\u662f\u4f1a\u6d6a\u8d39\u4e00\u4e0b\u5348\u7684\uff01<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
1\u3001 \u53ef\u53d8\u6570\u636e\u7c7b\u578b\u4f5c\u4e3a\u51fd\u6570\u5b9a\u4e49\u4e2d\u7684\u9ed8\u8ba4\u53c2\u6570<\/strong><\/div>\n

\u8fd9\u4f3c\u4e4e\u662f\u5bf9\u7684\uff1f\u4f60\u5199\u4e86\u4e00\u4e2a\u5c0f\u51fd\u6570\uff0c\u6bd4\u5982\uff0c\u641c\u7d22\u5f53\u524d\u9875\u9762\u4e0a\u7684\u94fe\u63a5\uff0c\u5e76\u53ef\u9009\u5c06\u5176\u9644\u52a0\u5230\u53e6\u4e00\u4e2a\u63d0\u4f9b\u7684\u5217\u8868\u4e2d\u3002<\/p>\n

def search_for_links(page, add_to=[]):\r\nnew_links = page.search_for_links()\r\nadd_to.extend(new_links)\r\nreturn add_to<\/pre>\n

\u4ece\u8868\u9762\u770b\uff0c\u8fd9\u50cf\u662f\u5341\u5206\u6b63\u5e38\u7684 Python \u4ee3\u7801\uff0c\u4e8b\u5b9e\u4e0a\u5b83\u4e5f\u662f\uff0c\u800c\u4e14\u662f\u53ef\u4ee5\u8fd0\u884c\u7684\u3002\u4f46\u662f\uff0c\u8fd9\u91cc\u6709\u4e2a\u95ee\u9898\u3002\u5982\u679c\u6211\u4eec\u7ed9 add_to \u53c2\u6570\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5217\u8868\uff0c\u5b83\u5c06\u6309\u7167\u6211\u4eec\u9884\u671f\u7684\u90a3\u6837\u5de5\u4f5c\u3002\u4f46\u662f\uff0c\u5982\u679c\u6211\u4eec\u8ba9\u5b83\u4f7f\u7528\u9ed8\u8ba4\u503c\uff0c\u5c31\u4f1a\u51fa\u73b0\u4e00\u4e9b\u795e\u5947\u7684\u4e8b\u60c5\u3002
\n\u8bd5\u8bd5\u4e0b\u9762\u7684\u4ee3\u7801\uff1a<\/p>\n

def fn(var1, var2=[]):\r\nvar2.append(var1)\r\nprint var2\r\nfn(3)\r\nfn(4)\r\nfn(5)\r\n<\/pre>\n

\u53ef\u80fd\u4f60\u8ba4\u4e3a\u6211\u4eec\u5c06\u770b\u5230\uff1a<\/p>\n

[3]\r\n[4]\r\n[5]\r\n<\/pre>\n

\u4f46\u5b9e\u9645\u4e0a\uff0c\u6211\u4eec\u770b\u5230\u7684\u5374\u662f\uff1a<\/p>\n

[3]\r\n[3, 4]\r\n[3, 4, 5]\r\n<\/pre>\n

\u4e3a\u4ec0\u4e48\u5462\uff1f\u5982\u4f60\u6240\u89c1\uff0c\u6bcf\u6b21\u90fd\u4f7f\u7528\u7684\u662f\u540c\u4e00\u4e2a\u5217\u8868\uff0c\u8f93\u51fa\u4e3a\u4ec0\u4e48\u4f1a\u662f\u8fd9\u6837\uff1f\u5728 Python \u4e2d\uff0c\u5f53\u6211\u4eec\u7f16\u5199\u8fd9\u6837\u7684\u51fd\u6570\u65f6\uff0c\u8fd9\u4e2a\u5217\u8868\u88ab\u5b9e\u4f8b\u5316\u4e3a\u51fd\u6570\u5b9a\u4e49\u7684\u4e00\u90e8\u5206\u3002\u5f53\u51fd\u6570\u8fd0\u884c\u65f6\uff0c\u5b83\u5e76\u4e0d\u662f\u6bcf\u6b21\u90fd\u88ab\u5b9e\u4f8b\u5316\u3002\u8fd9\u610f\u5473\u7740\uff0c\u8fd9\u4e2a\u51fd\u6570\u4f1a\u4e00\u76f4\u4f7f\u7528\u5b8c\u5168\u4e00\u6837\u7684\u5217\u8868\u5bf9\u8c61\uff0c\u9664\u975e\u6211\u4eec\u63d0\u4f9b\u4e00\u4e2a\u65b0\u7684\u5bf9\u8c61\uff1a<\/p>\n

fn(3, [4])\r\n<\/pre>\n
[4, 3]\r\n<\/pre>\n

\u7b54\u6848\u6b63\u5982\u6211\u4eec\u6240\u60f3\u7684\u90a3\u6837\u3002\u8981\u60f3\u5f97\u5230\u8fd9\u79cd\u7ed3\u679c\uff0c\u6b63\u786e\u7684\u65b9\u6cd5\u662f\uff1a<\/p>\n

def fn(var1, var2=None):\r\nif not var2:\r\nvar2 = []\r\nvar2.append(var1)\r\n<\/pre>\n

\u6216\u662f\u5728\u7b2c\u4e00\u4e2a\u4f8b\u5b50\u4e2d\uff1a<\/p>\n

def search_for_links(page, add_to=None):\r\nif not add_to:\r\nadd_to = []\r\nnew_links = page.search_for_links()\r\nadd_to.extend(new_links)\r\nreturn add_to\r\n<\/pre>\n

\u8fd9\u5c06\u5728\u6a21\u5757\u52a0\u8f7d\u7684\u65f6\u5019\u79fb\u8d70\u5b9e\u4f8b\u5316\u7684\u5185\u5bb9\uff0c\u4ee5\u4fbf\u6bcf\u6b21\u8fd0\u884c\u51fd\u6570\u65f6\u90fd\u4f1a\u53d1\u751f\u5217\u8868\u5b9e\u4f8b\u5316\u3002\u8bf7\u6ce8\u610f\uff0c\u5bf9\u4e8e\u4e0d\u53ef\u53d8\u6570\u636e\u7c7b\u578b\uff0c\u6bd4\u5982\u5143\u7ec4\u3001\u5b57\u7b26\u4e32\u3001\u6574\u578b\uff0c\u662f\u4e0d\u9700\u8981\u8003\u8651\u8fd9\u79cd\u60c5\u51b5\u7684\u3002\u8fd9\u610f\u5473\u7740\uff0c\u50cf\u4e0b\u9762\u8fd9\u6837\u7684\u4ee3\u7801\u662f\u975e\u5e38\u53ef\u884c\u7684\uff1a<\/p>\n

def func(message=\"my message\"):\r\nprint message\r\n<\/pre>\n
2\u3001 \u53ef\u53d8\u6570\u636e\u7c7b\u578b\u4f5c\u4e3a\u7c7b\u53d8\u91cf<\/strong><\/div>\n

\u8fd9\u548c\u4e0a\u9762\u63d0\u5230\u7684\u6700\u540e\u4e00\u4e2a\u9519\u8bef\u5f88\u76f8\u50cf\u3002\u601d\u8003\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n

class URLCatcher(object):\r\nurls = []\r\ndef add_url(self, url):\r\nself.urls.append(url)\r\n<\/pre>\n

\u8fd9\u6bb5\u4ee3\u7801\u770b\u8d77\u6765\u975e\u5e38\u6b63\u5e38\u3002\u6211\u4eec\u6709\u4e00\u4e2a\u50a8\u5b58 URL \u7684\u5bf9\u8c61\u3002\u5f53\u6211\u4eec\u8c03\u7528 add_url \u65b9\u6cd5\u65f6\uff0c\u5b83\u4f1a\u6dfb\u52a0\u4e00\u4e2a\u7ed9\u5b9a\u7684 URL \u5230\u5b58\u50a8\u4e2d\u3002\u770b\u8d77\u6765\u975e\u5e38\u6b63\u786e\u5427\uff1f\u8ba9\u6211\u4eec\u770b\u770b\u5b9e\u9645\u662f\u600e\u6837\u7684\uff1a<\/p>\n

a = URLCatcher()\r\na.add_url('http:\/\/www.google.com')\r\nb = URLCatcher()\r\nb.add_url('http:\/\/www.bbc.co.hk')\r\n<\/pre>\n

b.urls\uff1a<\/p>\n

['http:\/\/www.google.com', 'http:\/\/www.bbc.co.uk']\r\n<\/pre>\n

a.urls\uff1a<\/p>\n

['http:\/\/www.google.com', 'http:\/\/www.bbc.co.uk']\r\n<\/pre>\n

\u7b49\u7b49\uff0c\u600e\u4e48\u56de\u4e8b\uff1f\uff01\u6211\u4eec\u60f3\u7684\u4e0d\u662f\u8fd9\u6837\u554a\u3002\u6211\u4eec\u5b9e\u4f8b\u5316\u4e86\u4e24\u4e2a\u5355\u72ec\u7684\u5bf9\u8c61 a \u548c b\u3002\u628a\u4e00\u4e2a URL \u7ed9\u4e86 a\uff0c\u53e6\u4e00\u4e2a\u7ed9\u4e86 b\u3002\u8fd9\u4e24\u4e2a\u5bf9\u8c61\u600e\u4e48\u4f1a\u90fd\u6709\u8fd9\u4e24\u4e2a URL \u5462\uff1f
\n\u8fd9\u548c\u7b2c\u4e00\u4e2a\u9519\u4f8b\u662f\u540c\u6837\u7684\u95ee\u9898\u3002\u521b\u5efa\u7c7b\u5b9a\u4e49\u65f6\uff0cURL \u5217\u8868\u5c06\u88ab\u5b9e\u4f8b\u5316\u3002\u8be5\u7c7b\u6240\u6709\u7684\u5b9e\u4f8b\u4f7f\u7528\u76f8\u540c\u7684\u5217\u8868\u3002\u5728\u6709\u4e9b\u65f6\u5019\u8fd9\u79cd\u60c5\u51b5\u662f\u6709\u7528\u7684\uff0c\u4f46\u5927\u591a\u6570\u65f6\u5019\u4f60\u5e76\u4e0d\u60f3\u8fd9\u6837\u505a\u3002\u4f60\u5e0c\u671b\u6bcf\u4e2a\u5bf9\u8c61\u6709\u4e00\u4e2a\u5355\u72ec\u7684\u50a8\u5b58\u3002\u4e3a\u6b64\uff0c\u6211\u4eec\u4fee\u6539\u4ee3\u7801\u4e3a\uff1a<\/p>\n

class URLCatcher(object):\r\ndef __init__(self):\r\nself.urls = []\r\ndef add_url(self, url):\r\nself.urls.append(url)\r\n<\/pre>\n

\u73b0\u5728\uff0c\u5f53\u521b\u5efa\u5bf9\u8c61\u65f6\uff0cURL \u5217\u8868\u88ab\u5b9e\u4f8b\u5316\u3002\u5f53\u6211\u4eec\u5b9e\u4f8b\u5316\u4e24\u4e2a\u5355\u72ec\u7684\u5bf9\u8c61\u65f6\uff0c\u5b83\u4eec\u5c06\u5206\u522b\u4f7f\u7528\u4e24\u4e2a\u5355\u72ec\u7684\u5217\u8868\u3002<\/p>\n

3\u3001 \u53ef\u53d8\u7684\u5206\u914d\u9519\u8bef<\/strong><\/div>\n

\u8fd9\u4e2a\u95ee\u9898\u56f0\u6270\u4e86\u6211\u4e00\u6bb5\u65f6\u95f4\u3002\u8ba9\u6211\u4eec\u505a\u51fa\u4e00\u4e9b\u6539\u53d8\uff0c\u5e76\u4f7f\u7528\u53e6\u4e00\u79cd\u53ef\u53d8\u6570\u636e\u7c7b\u578b - \u5b57\u5178\u3002<\/p>\n

a = {'1': \"one\", '2': 'two'}\r\n<\/pre>\n

\u73b0\u5728\uff0c\u5047\u8bbe\u6211\u4eec\u60f3\u628a\u8fd9\u4e2a\u5b57\u5178\u7528\u5728\u522b\u7684\u5730\u65b9\uff0c\u4e14\u4fdd\u6301\u5b83\u7684\u521d\u59cb\u6570\u636e\u5b8c\u6574\u3002<\/p>\n

b = a\r\nb['3'] = 'three'\r\n<\/pre>\n

\u7b80\u5355\u5427\uff1f \u73b0\u5728\uff0c\u8ba9\u6211\u4eec\u770b\u770b\u539f\u6765\u90a3\u4e2a\u6211\u4eec\u4e0d\u60f3\u6539\u53d8\u7684\u5b57\u5178 a\uff1a<\/p>\n

{'1': \"one\", '2': 'two', '3': 'three'}\r\n<\/pre>\n

\u54c7\u7b49\u4e00\u4e0b\uff0c\u6211\u4eec\u518d\u770b\u770b b\uff1f<\/p>\n

{'1': \"one\", '2': 'two', '3': 'three'}\r\n<\/pre>\n

\u7b49\u7b49\uff0c\u4ec0\u4e48\uff1f\u6709\u70b9\u4e71\u2026\u2026\u8ba9\u6211\u4eec\u56de\u60f3\u4e00\u4e0b\uff0c\u770b\u770b\u5176\u5b83\u4e0d\u53ef\u53d8\u7c7b\u578b\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\u4f1a\u53d1\u751f\u4ec0\u4e48\uff0c\u4f8b\u5982\u4e00\u4e2a\u5143\u7ec4\uff1a<\/p>\n

c = (2, 3)\r\nd = c\r\nd = (4, 5)\r\n<\/pre>\n

\u73b0\u5728\u00a0c\u00a0\u662f (2, 3)\uff0c\u800c\u00a0d\u00a0\u662f (4, 5)\u3002
\n\u8fd9\u4e2a\u51fd\u6570\u7ed3\u679c\u5982\u6211\u4eec\u6240\u6599\u3002\u90a3\u4e48\uff0c\u5728\u4e4b\u524d\u7684\u4f8b\u5b50\u4e2d\u5230\u5e95\u53d1\u751f\u4e86\u4ec0\u4e48\uff1f\u5f53\u4f7f\u7528\u53ef\u53d8\u7c7b\u578b\u65f6\uff0c\u5176\u884c\u4e3a\u6709\u70b9\u50cf C \u8bed\u8a00\u7684\u4e00\u4e2a\u6307\u9488\u3002\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u4ee4 b = a\uff0c\u6211\u4eec\u771f\u6b63\u8868\u8fbe\u7684\u610f\u601d\u662f\uff1ab \u6210\u4e3a a \u7684\u4e00\u4e2a\u5f15\u7528\u3002\u5b83\u4eec\u90fd\u6307\u5411 Python \u5185\u5b58\u4e2d\u7684\u540c\u4e00\u4e2a\u5bf9\u8c61\u3002\u542c\u8d77\u6765\u6709\u4e9b\u719f\u6089\uff1f\u90a3\u662f\u56e0\u4e3a\u8fd9\u4e2a\u95ee\u9898\u4e0e\u5148\u524d\u7684\u76f8\u4f3c\u3002\u5176\u5b9e\uff0c\u8fd9\u7bc7\u6587\u7ae0\u5e94\u8be5\u88ab\u79f0\u4e3a\u300c\u53ef\u53d8\u5f15\u53d1\u7684\u9ebb\u70e6\u300d\u3002
\n\u5217\u8868\u4e5f\u4f1a\u53d1\u751f\u540c\u6837\u7684\u4e8b\u5417\uff1f\u662f\u7684\u3002\u90a3\u4e48\u6211\u4eec\u5982\u4f55\u89e3\u51b3\u5462\uff1f\u8fd9\u5fc5\u987b\u975e\u5e38\u5c0f\u5fc3\u3002\u5982\u679c\u6211\u4eec\u771f\u7684\u9700\u8981\u590d\u5236\u4e00\u4e2a\u5217\u8868\u8fdb\u884c\u5904\u7406\uff0c\u6211\u4eec\u53ef\u4ee5\u8fd9\u6837\u505a\uff1a<\/p>\n

b = a[:]<\/pre>\n

\u8fd9\u5c06\u904d\u5386\u5e76\u590d\u5236\u5217\u8868\u4e2d\u7684\u6bcf\u4e2a\u5bf9\u8c61\u7684\u5f15\u7528\uff0c\u5e76\u4e14\u628a\u5b83\u653e\u5728\u4e00\u4e2a\u65b0\u7684\u5217\u8868\u4e2d\u3002\u4f46\u662f\u8981\u6ce8\u610f\uff1a\u5982\u679c\u5217\u8868\u4e2d\u7684\u6bcf\u4e2a\u5bf9\u8c61\u90fd\u662f\u53ef\u53d8\u7684\uff0c\u6211\u4eec\u5c06\u518d\u6b21\u83b7\u5f97\u5b83\u4eec\u7684\u5f15\u7528\uff0c\u800c\u4e0d\u662f\u5b8c\u6574\u7684\u526f\u672c\u3002
\n\u5047\u8bbe\u5728\u4e00\u5f20\u7eb8\u4e0a\u5217\u6e05\u5355\u3002\u5728\u539f\u6765\u7684\u4f8b\u5b50\u4e2d\u76f8\u5f53\u4e8e\uff0cA \u67d0\u548c B \u67d0\u6b63\u5728\u770b\u7740\u540c\u4e00\u5f20\u7eb8\u3002\u5982\u679c\u6709\u4e2a\u4eba\u4fee\u6539\u4e86\u8fd9\u4e2a\u6e05\u5355\uff0c\u4e24\u4e2a\u4eba\u90fd\u5c06\u770b\u5230\u76f8\u540c\u7684\u53d8\u5316\u3002\u5f53\u6211\u4eec\u590d\u5236\u5f15\u7528\u65f6\uff0c\u6bcf\u4e2a\u4eba\u73b0\u5728\u6709\u4e86\u4ed6\u4eec\u81ea\u5df1\u7684\u6e05\u5355\u3002\u4f46\u662f\uff0c\u6211\u4eec\u5047\u8bbe\u8fd9\u4e2a\u6e05\u5355\u5305\u62ec\u5bfb\u627e\u98df\u7269\u7684\u5730\u65b9\u3002\u5982\u679c\u201c\u51b0\u7bb1\u201d\u662f\u5217\u8868\u4e2d\u7684\u7b2c\u4e00\u4e2a\uff0c\u5373\u4f7f\u5b83\u88ab\u590d\u5236\uff0c\u4e24\u4e2a\u5217\u8868\u4e2d\u7684\u6761\u76ee\u4e5f\u90fd\u6307\u5411\u540c\u4e00\u4e2a\u51b0\u7bb1\u3002\u6240\u4ee5\uff0c\u5982\u679c\u51b0\u7bb1\u88ab A \u4fee\u6539\uff0c\u5403\u6389\u4e86\u91cc\u9762\u7684\u5927\u86cb\u7cd5\uff0cB \u4e5f\u5c06\u770b\u5230\u8fd9\u4e2a\u86cb\u7cd5\u7684\u6d88\u5931\u3002\u8fd9\u91cc\u6ca1\u6709\u7b80\u5355\u7684\u65b9\u6cd5\u89e3\u51b3\u5b83\u3002\u53ea\u8981\u4f60\u8bb0\u4f4f\u5b83\uff0c\u5e76\u7f16\u5199\u4ee3\u7801\u7684\u65f6\u5019\uff0c\u4f7f\u7528\u4e0d\u4f1a\u9020\u6210\u8fd9\u4e2a\u95ee\u9898\u7684\u65b9\u5f0f\u3002
\n\u5b57\u5178\u4ee5\u76f8\u540c\u7684\u65b9\u5f0f\u5de5\u4f5c\uff0c\u5e76\u4e14\u4f60\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u521b\u5efa\u4e00\u4e2a\u6602\u8d35\u526f\u672c\uff1a<\/p>\n

b = a.copy()<\/pre>\n

\u518d\u6b21\u8bf4\u660e\uff0c\u8fd9\u53ea\u4f1a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u5b57\u5178\uff0c\u6307\u5411\u539f\u6765\u5b58\u5728\u7684\u76f8\u540c\u7684\u6761\u76ee\u3002\u56e0\u6b64\uff0c\u5982\u679c\u6211\u4eec\u6709\u4e24\u4e2a\u76f8\u540c\u7684\u5217\u8868\uff0c\u5e76\u4e14\u6211\u4eec\u4fee\u6539\u5b57\u5178 a \u7684\u4e00\u4e2a\u952e\u6307\u5411\u7684\u53ef\u53d8\u5bf9\u8c61\uff0c\u90a3\u4e48\u5728\u5b57\u5178 b \u4e2d\u4e5f\u5c06\u770b\u5230\u8fd9\u4e9b\u53d8\u5316\u3002
\n\u53ef\u53d8\u6570\u636e\u7c7b\u578b\u7684\u9ebb\u70e6\u4e5f\u662f\u5b83\u4eec\u5f3a\u5927\u7684\u5730\u65b9\u3002\u4ee5\u4e0a\u90fd\u4e0d\u662f\u5b9e\u9645\u4e2d\u7684\u95ee\u9898\uff1b\u5b83\u4eec\u662f\u4e00\u4e9b\u8981\u6ce8\u610f\u9632\u6b62\u51fa\u73b0\u7684\u95ee\u9898\u3002\u5728\u7b2c\u4e09\u4e2a\u9879\u76ee\u4e2d\u4f7f\u7528\u6602\u8d35\u590d\u5236\u64cd\u4f5c\u4f5c\u4e3a\u89e3\u51b3\u65b9\u6848\u5728 99% \u7684\u65f6\u5019\u662f\u6ca1\u6709\u5fc5\u8981\u7684\u3002\u4f60\u7684\u7a0b\u5e8f\u6216\u8bb8\u5e94\u8be5\u88ab\u6539\u6539\uff0c\u6240\u4ee5\u5728\u7b2c\u4e00\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u8fd9\u4e9b\u526f\u672c\u751a\u81f3\u662f\u4e0d\u9700\u8981\u7684\u3002
\n\u7f16\u7a0b\u5feb\u4e50\uff01\u5728\u8bc4\u8bba\u4e2d\u53ef\u4ee5\u968f\u65f6\u63d0\u95ee\u3002<\/p>\n


\n

\u4f5c\u8005\u7b80\u4ecb\uff1a Pete Savage - Peter \u662f\u4e00\u4f4d\u5145\u6ee1\u6fc0\u60c5\u7684\u5f00\u6e90\u7231\u597d\u8005\uff0c\u5728\u8fc7\u53bb\u5341\u5e74\u91cc\u4e00\u76f4\u5728\u63a8\u5e7f\u548c\u4f7f\u7528\u5f00\u6e90\u4ea7\u54c1\u3002\u4ed6\u4ece Ubuntu \u793e\u533a\u5f00\u59cb\uff0c\u5728\u8bb8\u591a\u4e0d\u540c\u7684\u9886\u57df\u81ea\u613f\u53c2\u4e0e\u97f3\u9891\u5236\u4f5c\u9886\u57df\u7684\u7814\u7a76\u5de5\u4f5c\u3002\u5728\u804c\u4e1a\u7ecf\u5386\u65b9\u9762\uff0c\u4ed6\u8d77\u521d\u4f5c\u4e3a\u516c\u53f8\u7684\u7cfb\u7edf\u7ba1\u7406\u5458\uff0c\u5927\u90e8\u5206\u65f6\u95f4\u5728\u7ba1\u7406\u548c\u5efa\u7acb\u6570\u636e\u4e2d\u5fc3\uff0c\u4e4b\u540e\u5728 Red Hat \u62c5\u4efb CloudForms \u4ea7\u54c1\u7684\u4e3b\u8981\u6d4b\u8bd5\u5de5\u7a0b\u5e08\u3002<\/p>\n


\n

via: https:\/\/opensource.com\/article\/17\/6\/3-things-i-did-wrong-learning-python<\/a><\/p>\n

\u4f5c\u8005\uff1aPete Savage<\/a> \u8bd1\u8005\uff1apolebug<\/a> \u6821\u5bf9\uff1awxy<\/a><\/p>\n

\u672c\u6587\u7531 LCTT<\/a> \u539f\u521b\u7f16\u8bd1\uff0cLinux\u4e2d\u56fd<\/a> \u8363\u8a89\u63a8\u51fa<\/p>\n

\n

\u539f\u6587\u6765\u81ea\uff1ahttps:\/\/linux.cn\/article-8780-1.html<\/a><\/p>\n

\u672c\u6587\u5730\u5740\uff1a http:\/\/lrxjmw.cn\/python-misunderstanding.html<\/a>\u7f16\u8f91\uff1a\u90d1\u5e05\uff0c\u5ba1\u6838\u5458\uff1a\u9004\u589e\u5b9d<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

\u5bfc\u8bfb \u4e3a\u4e86\u8ba9\u521d\u5b66 Python \u7684\u7a0b\u5e8f\u5458\u907f\u514d\u72af\u540c\u6837\u7684\u9519\u8bef\uff0c\u4ee5\u4e0b\u5217\u51fa\u4e86\u6211\u5b66\u4e60 Python \u65f6\u72af\u7684\u4e09\u79cd\u9519\u8bef\u3002\u8fd9\u4e9b […]<\/p>\n","protected":false},"author":63,"featured_media":81353,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-81319","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/81319","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=81319"}],"version-history":[{"count":8,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/81319\/revisions"}],"predecessor-version":[{"id":286236,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/81319\/revisions\/286236"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/81353"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=81319"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=81319"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=81319"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}