Coder Social home page Coder Social logo

Comments (7)

Changaco avatar Changaco commented on September 18, 2024

I suggest always giving a default value to your variables. Instead of leaving output undefined when foo isn't True-ish, give it a default value like None, that should solve the problem.

from aspen.py.

Changaco avatar Changaco commented on September 18, 2024

I think the only ever place we really hit this was with response,

In AspenWeb/pando.py#426 it was with resource, but as you said it was about writing the variable, not reading it, and we fixed the problem with AspenWeb/pando.py#427.

from aspen.py.

Changaco avatar Changaco commented on September 18, 2024

Should we rename this to aspen_output to avoid the conflict? Should we prefix other names, like path and qs?

I'm okay with that if it's only at the simplate level (i.e. when building the context in Simplate.render_for_type we replace output with aspen_output). I'm less certain about renaming the variables in the state.

from aspen.py.

chadwhitacre avatar chadwhitacre commented on September 18, 2024

We could also close this as a dupe of AspenWeb/pando.py#30.

from aspen.py.

chadwhitacre avatar chadwhitacre commented on September 18, 2024

Or perhaps close that as a dupe of this, since I think we want it in this repo instead of that one.

from aspen.py.

Changaco avatar Changaco commented on September 18, 2024

#27 is my preferred alternative solution to AspenWeb/pando.py#30.

from aspen.py.

chadwhitacre avatar chadwhitacre commented on September 18, 2024

Ah, that's right. :-)

Closing in favor of #27.

from aspen.py.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.