A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/063065.html below:

syntax from diveintopython

syntax from diveintopython syntax from diveintopythonFredrik Lundh fredrik at pythonware.com
Tue Apr 17 13:38:27 EDT 2001
> Here's the code i've been working with.  I borrowed the code to create my
> own HTMLProc class.  The difficulties begin with the uknown_starttag
> function.  I keep getting a syntax error on the strattrs assignment.  I
> thought I copied the code verbatim but it still generates a syntax
> error.

what Python version are you using?

> def unknown_starttag(self, tag, attrs):
>    strattrs = "".join([' %(key)s="%(value)s"' % locals() for key, value in attrs])
>    self.parts.append("<%(tag)s%(strattrs)s>" % locals())

whoever wrote the original code should have their python license
revoked.

Cheers /F



More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4