Leanpub Header

Skip to main content

El Aprendiz de Python

Este libro da una introducción al lenguaje de programación Python, dando las herramientas necesarias para ser un miembro efectivo en un proyecto de Python. Python es un lenguaje grande, y no es nuestra intención cubrir todo lo que se debe de saber. Queremos ayudarte a construir una fundación sólida, donde puedas continuar tu aprendizaje.

This book is a translation into Spanish of The Python Apprentice which was originally written in English

Minimum price

$14.99

$19.99

You pay

$19.99

Authors earn

$15.99
$

...Or Buy With Credits!

You can get credits monthly with a Reader Membership
PDF
EPUB
WEB
About

About

About the Book

El Aprendiz de Python junto con El Oficial de Python y El Maestro de Python son parte de una trilogía de libros en el lenguaje de programación Python y en la librería eståndar de Python. El material en éstos libros se deriva de los populares -y a prueba de guerra- cursos de Sixty North los cuáles han guiado a miles de programadores en el camino a la productividad con Python.

Nuestros libros, los cuales utilizan Python 3, siguen un curriculum en espiral: introducimos temas lentamente y después regresamos en múltiples ocasiones para añadir más profundidad requerida para ayudar a tu progresión como desarrollador de Python. Hemos trabajado duro para estructurar los temas y evitar referencias muy avanzadas a temas que no han sido cubiertos aún. Sólo en algunas ocasiones te pedimos que aceptes las técnicas ciegamente, ya que ahondaremos en ellas más tarde; y si lo hacemos, será para estabalecer buenos hábitos deliberadamente.

Share this book

Categories

This book is a translation into Spanish of The Python Apprentice which was originally written in English

Author

About the Authors

Austin Bingham

Austin is a founding director of Sixty North, a software consulting, training, and application development company. A native of Texas, in 2008 Austin moved to Stavanger, Norway where he helped develop industry-leading oil reservoir modeling software in C++ and Python. Prior to that he worked at National Instruments developing LabVIEW, at Applied Research Labs (Univ. of Texas at Austin) developing sonar systems for the U.S. Navy, and at a number of telecommunications companies. He is an experienced presenter and teacher, having spoken at numerous conferences, software groups, and internal corporate venues. Austin is also an active member of the open source community, contributing regularly to various Python and Emacs projects, and he’s the founder of Stavanger Software Developers, one of the largest and most active social software groups in Stavanger. Austin holds a Master of Science in Computer Engineering from the University of Texas at Austin.

Robert Smallshire

Robert Smallshire is a founding director of Sixty North, a software consulting and training business in Norway providing services throughout Europe, and which uses Python extensively. Robert has worked in senior architecture and technical management roles for several software companies providing tools in the energy sector. He has dealt with understanding, designing, advocating and implementing effective architectures for sophisticated scientific and enterprise software in Python, C++, C# and F# and Javascript. Robert is a regular speaker at conferences, meetups and corporate software events and can be found speaking about topics as diverse as behavioural microeconomics in software development to implementing web services on 8-bit microcontrollers. He is organiser of the Oslo Python group and holds a Ph.D. in a natural science.

Sixty North

Sixty North AS. Software Consulting and Training.

Contents

Table of Contents

Capítulo 1 – Comenzando

  1. Obtener e instalar Python 3
  2. Comenzando la línea de comando en el modo interactivo de Python
  3. Saliendo del modo interactivo
  4. Estructura de código e indentación significante
  5. La cultura de Python
  6. Importando librerías de módulos estándar
  7. Obteniendo ayuda help()
  8. Getting help()
  9. Tipos de datos escalares: integers, floats, None y bool
  10. Operadores relacionales
  11. Control de flujo: construcciones if y bucles while
  12. Resumen

Capítulo 2 – Cadenas y colecciones

  1. str - una secuencia inmutable de puntos de código Unicode
  2. Momento zen
  3. El constructor str
  4. bytes – una secuencia inmutable de bytes
  5. Diferencias en cadenas entre Python 3 y Python 2
  6. list - una secuencia de objetos
  7. dict - asociando claves con valores
  8. Bucles for- iterando sobre una serie de elementos
  9. Poniendo todo junto
  10. Resumen

Capítulo 3 – Modularidad

  1. Organizando el código en un archivo .py
  2. Definiendo funciones
  3. Organizando nuestros módulos dentro de funciones
  4. Hablando Python en voz alta
  5. El modelo de ejecución de Python
  6. Configuración de una función principal con argumento de línea de comando
  7. Momento zen
  8. Cadenas de documentación o Docstrings
  9. Comentarios
  10. Shebang
  11. Resumen

Capítulo 4 - Incorporación de tipos y modelos de objetos

  1. La naturaleza de las referencias de objetos de Python
  2. Argumento pasando la semántica - paso por referencia de objeto
  3. Python regresa semánticas
  4. Argumentos de función a detalle
  5. El sistema tipo Python.
  6. Declaración de variables y ámbito (scope).
  7. Momento zen
  8. Todo es un objeto
  9. Resúmen

Capítulo 6 – Excepciones

  1. Excepciones y flujo de control
  2. Manejo de excepciones
  3. Manejando múltiples excepciones
  4. Errores del programador
  5. Bloques vacíos - la declaración pass
  6. Objetos de excepción
  7. Códigos imprudentes de retorno
  8. Re-lanzando excepciones
  9. Las excepciones son parte de la API de tu función
  10. Cláusulas de guardia o vigilancia
  11. Excepciones, APIs y protocolos.
  12. Eligiendo no protegerse contra TypeError
  13. Estilo Pythónico – EAFP (Easier to Ask for Forgiveness than Permission; es má fácil pedir perdón que permiso) versus LBYL (Look Before you Leap; mira antes de saltar)
  14. Acciones de limpieza
  15. Momento zen
  16. Código específico de la plataforma
  17. Resumen

Capítulo 7 - Comprensiones, iterables y generadores

  1. Comprensiones
  2. Momento zen
  3. Protocolos de iteración
  4. Funciones generadoras
  5. Generador de expresiones
  6. Herramientas de iteración “baterías incluidas”
  7. Uniendo todo
  8. Resumen

Capítulo 8 – Definiendo nuevos tipos con clases

  1. Definiendo clases
  2. Métodos de instancia
  3. Inicializadores de instancia
  4. Validación e invariantes
  5. Agregar una segunda clase
  6. Clases colaboradoras
  7. Momento zen
  8. Reserva de asientos
  9. Métodos de nomenclatura para detalles de implementación
  10. A veces el único objeto que necesitas es una función.
  11. Polimorfísmo y duck typing
  12. Herencia e implementación compartida
  13. Resumen

Capítulo 9 – Gestión de archivos y recursos.

  1. Archivos
  2. Administradores de contexto
  3. Momento zen
  4. Archivos binarios
  5. Objetos tipo archivo
  6. Otros recursos
  7. Resumen

Capítulo 10 - Pruebas unitarias con la biblioteca estándar de Python

  1. Casos de prueba
  2. Fixtures o Accesorios
  3. Afirmaciones
  4. Ejemplo de prueba de unidad: análisis de texto
  5. Usando accesorios para crear archivos temporales
  6. Usando los nuevos accesorios
  7. Usar afirmaciones para probar el comportamiento
  8. Prueba de excepciones
  9. Prueba de existencia de archivo
  10. Momento zen
  11. Resúmen

Capítulo 11 - Depuración con PDB

  1. Comandos de depuración
  2. Depuración de Palindrome
  3. Summary

Epílogo: Sólo el comienzo

Apéndice A – Ambientes Virtuales

  1. Creando un ambiente virtual
  2. Activando un ambiente virtual
  3. Desactivando un ambiente virtual
  4. Otras herramientas para trabajar con ambientes virtuales

Apéndice B - Empaque y distribución

  1. Configurando un paquete con distutils
  2. Instalando con distutils
  3. Empaquetado con distutils

Apéndice C - Instalación de paquetes de terceros

  1. Introduciendo pip
  2. El Índice de Paquetes Python
  3. Instalando paquetes locales con pip
  4. Desinstalación de paquetes

Contributors

About the Contributors

Maria Antonieta Alcantara Rodriguez

Diana Rosado

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub