Giter Club home page Giter Club logo

Comments (3)

tmhedberg avatar tmhedberg commented on July 19, 2024

Thanks for your suggestion.

It would be my personal preference not to add special cases to the folding
logic. I realize that using if __name__ == '__main__': is a very strong
convention in Python, but it's not built-in syntax, which is where I would
prefer to draw the line. There are lots of other common idioms which we
could fold, but thus far have opted not to in favor of simplicity.

That being said, while I'm not inclined to implement this myself, I'd
consider accepting a well-written patch for it. It's not a bad idea, just
one that (arguably) falls outside the scope of this deliberately small and
lightweight plugin. I imagine that there are probably more users than just
yourself who have wanted this feature. So if you feel like adding this
feature yourself, we can talk about merging it in.

On Fri, Feb 7, 2014 at 5:55 AM, Ory Band [email protected] wrote:

I believe SimpylFold should be minimal as possible - folding only def and
class blocks. However, if name == 'main': block is kind of a
special case: It's the application's main code block.

Any chance of adding support to fold it as well?

Might as well handle reverse writing of this block, that is if 'main'
== name:, as some people use this convetion. Same for using double
quotes instead of single quotes.


Reply to this email directly or view it on GitHubhttps://github.com//issues/16
.

from simpylfold.

oryband avatar oryband commented on July 19, 2024

Thanks, perhaps I'll get to it in the future. You can close/stash this.

from simpylfold.

tmhedberg avatar tmhedberg commented on July 19, 2024

OK, feel free to reopen this ticket if you work on this in the future.

from simpylfold.

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.