Network


Latest external collaboration on country level. Dive into details by clicking on the dots.

Hotspot


Dive into the research topics where Mark Pilgrim is active.

Publication


Featured researches published by Mark Pilgrim.


Archive | 2004

Test-First Programming

Mark Pilgrim

The previous chapter introduced unit testing and test cases for roman.py, a set of functions to convert to and from Roman numerals. In that chapter, we wrote the tests. In this chapter, we’ll write the code that those tests validate.


Archive | 2009

Case Study: Porting chardet to Python 3

Mark Pilgrim

Unknown or incorrect character encoding is the number one cause of gibberish text on the web, in your inbox, and indeed across every computer system ever written. In Chapter 4, I talked about the history of character encoding and the creation of Unicode, the “one encoding to rule them all.” I’d love it if I never had to see a gibberish character on a web page again because that would require that all authoring systems stored accurate encoding information, all transfer protocols were Unicode-aware, and every system that handled text maintained perfect fidelity when converting between encodings.


Archive | 2009

Serializing Python Objects

Mark Pilgrim

The concept of serialization is simple. You have a data structure in memory that you want to save, reuse, or send to someone else. How can you do that? Well, that depends on how you want to save it, how you want to reuse it, and to whom you want to send it. Many games allow you to save your progress when you quit the game and pick up where you left off when you relaunch the game. (Actually, many non-gaming applications do this as well.) In this case, a data structure that captures “your progress so far” needs to be stored on disk when you quit and then loaded from disk when you relaunch. The data is meant to be used only by the same program that created it, never sent over a network, and never read by anything other than the program that created it. Therefore, the interoperability issues are limited to ensuring that later versions of the program can read data written by earlier versions.


Archive | 2009

Packaging Python Libraries

Mark Pilgrim

So you want to release a Python script, library, framework, or application. Excellent. The world needs more Python code.


Archive | 2009

Classes and Iterators

Mark Pilgrim

Generators are really just a special case of iterators. A function that yields values is a nice, compact way of building an iterator without building an iterator. Let me show you what I mean by that.


Archive | 2009

Closures and Generators

Mark Pilgrim

For reasons passing all understanding, I have always been fascinated by languages. Not programming languages. Well yes, programming languages, but also natural languages. Take English. English is a schizophrenic language that borrows words from German, French, Spanish, and Latin (to name a few). Actually, borrows is the wrong word; pillages is more like it. Or perhaps assimilates—like the Borg. Yes, I like that.


Archive | 2009

Your First Python Program

Mark Pilgrim

Books about programming usually start with a bunch of boring chapters about fundamentals and eventually work up to building something useful. Let’s skip all that. Listing 1-1 is a complete working Python program that probably makes absolutely no sense to you. Don’t worry about that because you’ll dissect it line by line. But read through it first and see what, if anything, you can make of it.


Archive | 2004

Objects and Object-Orientation

Mark Pilgrim

This chapter, and pretty much every chapter after this, deals with object-oriented Python programming.


Archive | 2004

The Power of Introspection

Mark Pilgrim

This chapter covers one of Python’s strengths: introspection. As you know, everything in Python is an object, and introspection is code looking at other modules and functions in memory as objects, getting information about them, and manipulating them. Along the way, you’ll define functions with no name, call functions with arguments out of order, and reference functions whose names you don’t even know ahead of time.


Archive | 2004

Scripts and Streams

Mark Pilgrim

This chapter continues the coverage of XML processing we began in Chapter 9. One of Python’s greatest strengths is its dynamic binding, and one powerful use of dynamic binding is the file-like object. You’ll see how what this has to do with XML processing in this chapter.

Collaboration


Dive into the Mark Pilgrim's collaboration.

Researchain Logo
Decentralizing Knowledge