[python-advocacy] [PSF-Members] Forrester Research Survey Answers for Review

Steven Bethard steven.bethard at gmail.com
Sat May 26 18:24:34 CEST 2007

On 5/26/07, Jeff Rush <jeff at taupro.com> wrote:
> Whew! I've finished filling out the survey response to Forrester Research and
> it was much harder than I expected.  I'll be delivering it to them on Tuesday
> morning, so I'm making it available online to the community for correction and
> final input.
>   http://dfwpython.org/uploads/Forrester/forrester-survey.txt

Thanks for doing this.

F22: Generics
     Does the language support use of generics or "duck" typing?

"Duck" typing refers to the explicit testing of argument types and inheritance
relationships to control behavior.
This testing, as stated, is explicit and there is an ongoing research effort
to provide conventional generics, making the dispatch mechanism more implicit.

That seems misleading to me.  "Duck" typing doesn't require explicit
testing of anything.  According to the Wikipedia article you linked
to, "duck typing is a principle of dynamic typing in which an object's
interface and attributes determine valid semantics" and in Python "it
typically employs hasattr() tests or EAFP (Easier to Ask Forgiveness
than Permission) programming". In particular that latter one means you
*don't* make an explicit test -- instead, you catch the exception.

I think I would have written this section more like:

"Duck" typing allows an object to be interchangeable with any other
object so long as they both implement sufficiently compatible
interfaces. The term was coined by a Python developer and the
technique is a very common one in the community.

Python also supports a number of different implementations of generic
functions. Python core supports specific generic functions (like the
one for counting the number of items in a container) which are
extended by defining an appropriately named method on an object.
Beyond these specific, language-defined generic functions, a variety
of community modules are available for defining a wider variety of
generic functions, including simplegeneric and Peak Rules.


F32: Is it possible to compile applications into binary or byte code
for performance or packaging reasons?
There are several binary compilers for Python, the most well-known of which is

Is Psyco a binary compiler? From the Psyco page: "Psyco is a
Just-In-Time Specializer, not really a compiler at all.". It does emit
machine code though, I guess...

Might be worth mentioning Shed Skin
(http://mark.dufour.googlepages.com/) which compiles Python to C++
(which can then be compiled to binary).

Support for Web-centric apps

I expected Django, TurboGearsand Pylons to all be mentioned somewhere
in here. I don't really understand the questions well enough to
suggest where, but at PyCon, these seemed to be the leading web
frameworks (in addition to Zope, which is already mentioned).

F57: Support for relational data binding
     Does the language support mapping relational data into language constructs?

Yes, the community has developed a specification (DB-API 2) for interfacing
Python to relational databases.  In addition, there are two mature frameworks,
SQLAlchemy and SQLObject, for mapping relational concepts onto the Python
object module.

Might also be worth mentioning Django which has another API for
mapping relation concepts to objects.

I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a
tiny blip on the distant coast of sanity.
        --- Bucky Katt, Get Fuzzy

More information about the Advocacy mailing list