Python 3入门指南:从2到3升级实战与字符串处理

5星 · 超过95%的资源 需积分: 9 11 下载量 6 浏览量 更新于2024-09-29 收藏 2.46MB PDF 举报
"《深入Python 3》是一本经典的Python学习指南,旨在帮助已经熟悉Python 2的用户过渡到Python 3。本书特别关注于Python 3的重大更新,包括语法变化,如将`print`语句转换为函数,变量名规则的改变等。章节1.1以"THE MINUS LEVEL"为标题,强调对于Python 2老手来说,直接进入Python 3可能会遇到的挑战,特别是字符串处理方面的差异。 在学习Python 3的过程中,首先推荐使用Python提供的2to3脚本来辅助代码迁移,这是一个自动工具,可以处理许多Python 2到Python 3的语法转换。但要注意,尽管2to3能自动处理很多问题,但它无法解决所有问题,尤其当涉及到库或复杂代码结构时,可能需要深入理解库的工作原理才能修复问题。例如,章节中的案例研究——Porting chardet to Python 3,详细记录了作者将一个非trivial的Python 2库迁移到Python 3的实际过程,这个案例提供了实际操作中的经验和教训,展示了在迁移过程中可能遇到的困难,如字符串处理、兼容性问题等。 字符串是本书的重要部分,Python 3对字符串处理做了显著改进,如字符串字面量不再是区分大小写的,这可能导致在迁移过程中需要重新考虑字符串操作的写法。此外,字符串方法和模块的行为也发生了变化,因此理解和适应这些改动是向Python 3迈进的关键步骤。 《深入Python 3》不仅提供了语法更新的概述,还通过实例演示了如何处理代码迁移中的具体问题,对于那些希望提升Python 3技能并升级旧项目的人来说,这是一本非常实用的参考资料。阅读这本书时,既要有耐心又要有实践,因为理解和掌握Python 3的新特性是实现平滑过渡的关键。"

Casola, V., & Castiglione, A. (2020). Secure and Trustworthy Big Data Storage. Springer. Corriveau, D., Gerrish, B., & Wu, Z. (2020). End-to-end Encryption on the Server: The Why and the How. arXiv preprint arXiv:2010.01403. Dowsley, R., Nascimento, A. C. A., & Nita, D. M. (2021). Private database access using homomorphic encryption. Journal of Network and Computer Applications, 181, 103055. Hossain, M. A., Fotouhi, R., & Hasan, R. (2019). Towards a big data storage security framework for the cloud. In Proceedings of the 9th Annual Computing and Communication Workshop and Conference (CCWC), Las Vegas, USA (pp. 402-408). Rughani, R. (2019). Analysis of Security Issues and Their Solutions in Cloud Storage Environment. International Journal of Computer Trends and Technology (IJCTT), 67(6), 37-42. van Esbroeck, A. (2019). Zero-Knowledge Proofs in the Age of Cryptography: Preventing Fraud Without Compromising Privacy. Chicago-Kent Journal of Intellectual Property, 19, 374. Berman, L. (2021). Watch out for hidden cloud costs. CFO Dive. Retrieved from https://www.cfodive.com/news/watch-out-for-hidden-cloud-costs/603921/ Bradley, T. (2021). Cloud storage costs continue to trend downward. Forbes. Retrieved from https://www.forbes.com/sites/tonybradley/2021/08/27/cloud-storage-costs-continue-to-trend-downward/?sh=6f9d6ade7978 Cisco. (2019). Cost optimization in the multicloud. Cisco. Retrieved from https://www.cisco.com/c/dam/en/us/solutions/collateral/data-center-virtualization/cloud-cost-optimization/cost-optimization_in_multicloud.pdf IBM. (2020). Storage efficiency solutions. IBM. Retrieved from https://www.ibm.com/blogs/systems/storage-efficiency-solutions/ Microsoft Azure. (n.d.). Azure Blob storage tiers. Microsoft Azure. Retrieved from https://azure.microsoft.com/en-us/services/storage/blobs/#pricing Nawrocki, M. (2019). The benefits of a hybrid cloud strategy for businesses. DataCenterNews. Retrieved from https://datacenternews.asia/story/the-benefits-of-a-hybrid-cloud-strategy-for,请把这一段reference list改为标准哈佛格式

2023-05-29 上传