چه کسانی این کتاب را می‌خوانند

دانشجوعلاقه‌مند یادگیری
کتابخوان حرفه‌ایلذت مطالعه
نویسندهالهام‌گیری

Python Essentials - A Rapid Guide to the Fundamental Features of Python

Steven F. Lott

قیمت نهایی

۴۰٬۰۰۰ تومان۴۹٬۰۰۰ تومان۱۸٪ تخفیف
  • تخفیف زمان‌دار−۹٬۰۰۰ تومان

۹٬۰۰۰ تومان صرفه‌جویی نسبت به قیمت اصلی

نسخه اصلی و اورجینال

بلافاصله پس از خرید، فایل کتاب روی دستگاه شما آمادهٔ دانلود است.

تحویل فوری
پرداخت امن
ضمانت فایل
پشتیبانی

مشخصات کتاب

نویسنده
Steven F. Lott
سال انتشار
۲۰۱۵
فرمت
PDF
زبان
انگلیسی
تعداد صفحات
۵ صفحه
حجم فایل
۲۰ مگابایت
شابک
9781784390341، 9781784398149، 1784390348، 1784398144

دربارهٔ کتاب

Key Features* Learn how to write effective Python code * Get up-to-speed with the most important data structures in Python, using sequences, sets, and mappings * Explore Python's impressive range of features and discover why it's one of the most popular programming languages in the world Book Description__Python Essentials__ provides a vital tour of the most critical features of Python. Starting with setup and installation, you will soon dive into exploring built-in-library types, Python's rich collection of operators and built-in functions, variables, assignment and scoping rules. From this foundation, you will explore functions, a crucial aspect of any programming language, including considerable sophistication in defining parameters to a function and providing argument values. Explore advanced functional programming using generator expressions, comprehensions, and generator functions. Handle file input and output using web services and context managers, exception handling and explore wider, popular frameworks. Through this concise and practical guide, you will explore all you need to know to leverage this powerful, and industry-standard, programming language. What you will learn* Use Python interactively and master the art of writing efficient Python scripts * Learn techniques for working with string data, including how to use regular expressions to parse strings * Get to know how the short-circuit and if-else logic operators work * Explore mutable data structures including list, set, and dict * Define functions with positional and optional parameters, and learn to use keyword argument values when calling a function * Write generator functions, generator expressions, and comprehensions * Master the use of exceptions for handling errors and other unexpected conditions * Understand the importance of working with files, context manager, and the with statement About the Author**Steven F. Lott** has been programming since the 70s, when computers were large, expensive, and rare. As a contract software developer and architect, he has worked on hundreds of projects, from very small to very large. He's been using Python to solve business problems for over 10 years Table of Contents1. Getting Started 2. Simple Data Types 3. Expressions and Output 4. Variables, Assignment and Scoping Rules 5. Logic, Comparisons, and Conditions 6. More Complex Data Types 7. Basic Function Definitions 8. More Advanced Functions 9. Exceptions 10. Files, Databases, Networks, and Contexts 11. Class Definitions 12. Scripts, Modules, Packages, Libraries, and Applications 13. Metaprogramming and Decorators 14. Fit and Finish Unit Testing, Packaging, and Documentation 15. Next Steps Cover Copyright Credits About the Author About the Reviewers www.PacktPub.com Table of Contents Preface Chapter 1: Getting Started Installation or upgrade Installing Python on Windows Considering some alternatives Upgrading to Python 3.4 in Mac OS X Adding the Tkinter package Upgrading to Python 3.4 in Linux Using the Read-Evaluate-Print Loop (REPL) Confirming that things are working Doing simple arithmetic Assigning results to variables Using import to add features Interacting with the help subsystem Using the pydoc program Creating simple script files Simplified syntax rules The Python ecosystem The idea of extensibility via add-ons Using the Python Package Index – PyPI Using pip to gather modules Using easy_install to add modules Installing modules manually Looking at other Python interpreters Summary Chapter 2: Simple Data Types Introducing the built-in operators Making comparisons Using integers Using the bit-oriented operators Using rational numbers Using decimal numbers Using floating-point numbers Using complex numbers The numeric tower The math libraries Using bits and Boolean values Working with sequences Slicing and dicing a sequence Using string and bytes values Writing string literals Using raw string literals Using byte string literals Using the string operators Converting between Unicode and bytes Using string methods Accessing the details of a string Parsing strings into substrings Using the tuple collection The None object The consequences of immutability Using the built-in conversion functions Summary Chapter 3: Expressions and Output Expressions, operators, and data types Using operators on non-numeric data The print() function Examining syntax rules Splitting, partitioning, and joining strings Using the format() method to make more readable output Summary of the standard string libraries Using the re module to parse strings Using regular expressions Creating a regular expression string Working with Unicode, ASCII and bytes Using the locale module for personalization Summary Chapter 4: Variables, Assignment and Scoping Rules Simple assignment and variables Multiple assignment Using repeated assignment Using the head, *tail assignment Augmented assignment The input() function Python language concepts Object types versus variable declarations Avoiding confusion when naming variables Garbage collection via reference counting The little-used del statement The Python namespace concept Globals and locals Summary Chapter 5: Logic, Comparisons, and Conditions Boolean data and the bool() function Comparison operators Combining comparisons to simplify the logic Testing float values Comparing object IDs with the is operator Equality and object hash values Logic operators – and, or, not, if-else Short-circuit (or non-strict) evaluation The if-elif-else statement Adding elif clauses The pass statement as placeholder The assert statement The logic of the None object Summary Chapter 6: More Complex Data Types The mutability and immutability distinction Using the list collection Using list operators Mutating a list with subscripts Mutating a list with method functions Accessing a list Using collection functions Using the set collection Using set operators Mutating a set with method functions Using augmented assignment with sets Accessing a set with operators and method functions Mappings Using dictionary operators Using dictionary mutators Using methods for accessing items in a mapping Using extensions from the collections module Processing collections with the for statement Using literal lists in a for statement Using the range() and enumerate() functions Iterating with the while statement The continue and break statements Breaking early from a loop Using the else clause on a loop Summary Chapter 7: Basic Function Definitions Looking at the five kinds of callables Defining functions with positional parameters Defining multiple parameters Using the return statement Evaluating a function with positional or keyword arguments Writing a function's docstring Mutable and immutable argument values Defining optional parameters via default values A warning about mutable default values Using the "everything else" notations of * and ** Using sequences and dictionaries to fill in *args and *kw Nested function definitions Working with namespaces Assigning a global variable Assigning a non-local variable Defining lambdas Writing additional function annotations Summary Chapter 8: More Advanced Functions Using the for statement with iterable collections Iterators and iterable collections Consequences and next steps Using generator expressions and comprehensions Limitations of generator expressions Using multiple loops and conditions Writing comprehensions Defining generator functions with the yield statement Using the higher-order functions Writing our own higher-order functions Using the built-in reductions – max, min, and reduce Three ways to sort a sequence Sorting via a key function Sorting via wrapping and unwrapping Functional programming design patterns Summary Chapter 9: Exceptions The core exception concept Examining the exception object Using the try and except statements Using nested try statements Matching exception classes in an except clause Matching more general exceptions The empty except clause Creating our own exceptions Using a finally clause Use cases for exceptions Issuing warnings instead of exceptions Permission versus forgiveness – a Pythonic approach Summary Chapter 10: Files, Databases, Networks, and Contexts The essential file concept Opening text files Filtering text lines Working with raw bytes Using file-like objects Using a context manager via the with statement Closing file-like objects with contextlib Using the shelve module as a database Using the sqlite database Using object-relational mapping Web services and Internet protocols Physical format considerations Summary Chapter 11: Class Definitions Creating a class Writing the suite of statements in a class Using instance variables and methods Pythonic object-oriented programming Trying to do type casting Designing for encapsulation and privacy Using properties Using inheritance to simplify class definitions Using multiple inheritance and the mixin design pattern Using class methods and attributes Using mutable class variables Writing static methods Using __slots__ to save storage The ABCs of abstract base classes Writing a callable class Summary Chapter 12: Scripts, Modules, Packages, Libraries, and Applications Script file rules Running a script by the filename Running a script by its module name Running a script using OS shell rules Choosing good script names Creating a reusable module Creating a hybrid library/application modules Creating a package Designing alternative implementations Seeing the package search path Summary Chapter 13: Metaprogramming and Decorators Simple metaprogramming with decorators Defining our own decorator More complex metaprogramming with metaclasses Summary FChapter 14: it and Finish – Unit Testing, Packaging, and Documentation Writing docstrings Writing unit tests with doctest Using the unittest library for testing Combining doctest and unittest Using other add-on test libraries Logging events and conditions Configuring the logging system Writing documentation with RST markup Creating HTML documentation from an RST source Using the Sphinx tool Organizing Python code Summary Chapter 15: Next Steps Leveraging the standard library Leveraging PyPI – the Python Package Index Types of applications Building CLI applications Getting command-line arguments with argparse Using the cmd module for interactive applications Building GUI applications Using more sophisticated packages Building web applications Using a web framework Building a RESTful web service with Flask Plugging into a MapReduce framework Summary Index Key FeaturesBook DescriptionWhat you will learnUse Python interactively and master the art of writing efficient Python scriptsLearn techniques for working with string data, including how to use regular expressions to parse stringsGet to know how the shortcircuit and ifelse logic operators workExplore mutable data structures including list, set, and dictDefine functions with positional and optional parameters, and learn to use keyword argument values when calling a functionWrite generator functions, generator expressions, and comprehensionsMaster the use of exceptions for handling errors and other unexpected conditionsUnderstand the importance of working with files, context manager, and the with statementWho this book is for

About This Book

  • Learn professional techniques to improve Lumion's workflow.
  • Improve your work quality by using Lumion's top features effectively.
  • Practical, efficient and deep insight into how to create astonishing visualizations using Lumion.

Who This Book Is For

This book is designed for advanced Lumion users who wish to apply these techniques to their own projects. The reader should be familiar with modeling knowledge and have at least a basic knowledge of a graphics editing program, such as Photoshop or Gimp.

"This book is designed for Python 2 developers who want to get to grips with Python 3 in a short period of time. It covers the key features of Python, assuming you are familiar with the fundamentals of Python 2."--Back cover

قیمت نهایی

۴۰٬۰۰۰ تومان