News for hackers. Stuff that matters.
Re:Python with Braces by tsm on Sunday February 09, 2014 @05:48PM (#7207732)
Maybe I'm being too harsh, but I feel like anyone who considers this a good idea isn't a sufficiently-Pythonic thinker to be writing Python anyway. Python isn't just a language--it's a culture, and one of that culture's core principles is that there should be one way to do it.
Re:Python with Braces by Pacabel on Sunday February 09, 2014 @06:08PM (#7207854)
One of the best things about Python is that there's comparatively little "culture", at least compared to Perl, Ruby or JavaScript.

The culture/community that does exist is more oriented toward helping people achieve what they want to or need to get done, rather than smugly regurgitating alleged "best practices" (Ruby and JavaScript) or absurdity (Perl).

Yes, there are the PEPs, but they're more about providing useful guidelines that can likely offer some benefit if followed, rather than dictating the "best" way of doing something. Avoiding the typical Python approaches may raise some eyebrows or cause some confusion, but basically never the visceral lashing that one would be likely to receive within the Ruby community, for example.

Re:Python with Braces by skywhopper on Sunday February 09, 2014 @06:32PM (#7207980)
Wow, now I really don't want to learn Python. (Psst, you have the most popular programming language. You can take off your persecution complex.)
Re:Python with Braces by billforsternz on Sunday February 09, 2014 @06:41PM (#7208028)
I don't understand; You hate that Python is all about helping people get things done ? That repels you ?
Re:Python with Braces by skywhopper on Monday February 10, 2014 @10:47AM (#7211617)
What repels me is the defensiveness and the apparent need to criticize other language communities. I'm not interested in joining a cult.
Re:Python with Braces by Pacabel on Monday February 10, 2014 @10:25PM (#7215584)
Like many other people, I use Python, Ruby, JavaScript, Java, and several other languages on an ongoing basis.

We don't really care about "communities" or "cultures" and whatnot. We just have work that we need to get done using those programming languages. This isn't about "defending the Python culture" or "attacking the Ruby community" or any crap like that.

Having dealt with so many different communities over the years, the Python community is by far the best to deal with, from a practical standpoint. Whenever I've had a Python-related question, the members of that community have done their best to help me out with achieving what I want to do.

This is very different from the typical response from the Ruby or JavaScript communities, where they'll consistently tell you that what you're doing is "wrong" or against their "best practices" of the hour. That's not the kind of "help" that we're looking for.

Get all emotional about this if you want. That's your right. But the rest of us have pragmatic, real-world concerns. The Python community does an excellent delivering us with useful help when we need it. Certain other communities do not. Those are just the facts.

Re:Python with Braces by spaceborn on Sunday February 09, 2014 @06:24PM (#7207940)
There may be a culture, but Python is simply a tool. One doesn't need to be a "Pythonic thinker" to use that tool. I'm not saying this is the most /sensible/ idea/project, but I see nothing in particular wrong with it. Your conception of culture here sounds oppressive and stifling to me.

Another commenter suggests the only reason to do something like this would be "emotional attachment"; all the huffing and puffing in these comments strikes me as exactly that, but in reverse.

Re:Python with Braces by lukeschlather on Sunday February 09, 2014 @06:39PM (#7208020)
I think your criticism would be valid if the braces were optional and tabs still worked, but this version of Python is still a Pythonic language. (Or at least, it's no less Pythonic than your standard Python.)
Re:Python with Braces by lutusp on Sunday February 09, 2014 @06:43PM (#7208041)
> I think your criticism would be valid if the braces were optional and tabs still worked ...

Surely you didn't mean tabs?

https://code.google.com/p/soc/wiki/PythonStyleGuide : "Indentation: 2 spaces (no tabs), differs from PEP8"

PEP8 (http://www.python.org/dev/peps/pep-0008/#tabs-or-spaces): "Tabs or Spaces? ... Spaces are the preferred indentation method. ... Python 2 code indented with a mixture of tabs and spaces should be converted to using spaces exclusively."

Re:Python with Braces by lukeschlather on Sunday February 09, 2014 @07:00PM (#7208120)
Of course not. My editor, like any proper editor, automatically inserts spaces when I hit tab.
Re:Python with Braces by lutusp on Sunday February 09, 2014 @07:13PM (#7208191)
> Of course not. My editor, like any proper editor, automatically inserts spaces when I hit tab.

Which translates to "yes".

Re:Python with Braces by dkuntz2 on Sunday February 09, 2014 @09:38PM (#7208765)
No, it translates to "it inserts soft tabs".
Re:Python with Braces by lutusp on Monday February 10, 2014 @04:18AM (#7209957)
"Soft tabs" are fiction. Show me the Python specification that says "you cannot use spaces, you must use soft tabs". The fictional soft tabs suffer from the same defect as real tabs -- they're defined in different ways in different places.

Source: https://code.google.com/p/soc/wiki/PythonStyleGuide

Quote: "Indentation: 2 spaces (no tabs)"

Gee, that's funny -- no mention of "soft tabs".

Source: http://www.python.org/dev/peps/pep-0008/

Quote: "Indentation ... Use 4 spaces per indentation level."

Where are the references to "soft tabs"?

Re:Python with Braces by dkuntz2 on Sunday February 09, 2014 @06:59PM (#7208113)
It's generally a given that people use the word `tab` to refer to both hard and soft tabs.
Re:Python with Braces by lutusp on Monday February 10, 2014 @04:19AM (#7209958)
Yes, and soft tabs are fiction. Prove me wrong -- show me a Python specification that tells us what "soft tabs" are and how they are to be used. Post the Unicode code point for a soft tab character.
Re:Python with Braces by skywhopper on Sunday February 09, 2014 @06:29PM (#7207964)
I'd been gradually warming up to the idea of getting over my distaste for Python's surface-level quirks and digging in and finally adding it to my repertoire, but this comment has made me reconsider.