Pointless example for Signal.connected_to #143

Closed
dag opened this Issue Nov 9, 2010 · 3 comments

Projects

None yet

2 participants

@dag
dag commented Nov 9, 2010

The example last in this section is pointless because the recorded list is never yielded and it is not reachable from anywhere. connected_to yields None.

def captured_templates(app):
    recorded = []
    def record(template, context):
        recorded.append((template, context))
    return template_rendered.connected_to(record, app)

It's still a meaningful pattern for like what Flask-Testing does, appending to self.templates which in deed is reachable from tests. What would be a sensible rewrite?

@dag
dag commented Nov 9, 2010

Oh also, Armin: if you could upload more freshly built docs that would be nice. I was bitten by the doc bug of record() neglecting to include the sender argument and noticed it was fixed in late August already, but not published on the website.

@mitsuhiko
The Pallets Projects member

Fixed a documentation error. This closed by 2ac1b7d

@mitsuhiko
The Pallets Projects member

Fixed. Will rebuild docs after looking over the rest of the tickets in my queue.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment