python 3000的替代缩进建议 [英] Alternate indent proposal for python 3000

查看:100
本文介绍了python 3000的替代缩进建议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在考虑为python编写一个替代块的建议

语法,我想我会在这里发布它并看看

一般反应是什么是。我做了一些搜索,虽然我发现很多

的标签与空间辩论,但我没有看到任何像我在想的那样

,所以原谅我,如果这是一匹非常死马。


一般来说,我喜欢当前的封锁方案。我每天都使用

python进行系统管理和文本解析

任务,这对我很有用。


不过,我发现自己需要一种语言服务器 -

包含在网页中。由于需要缩进(和

终止缩进),python似乎是一个尴尬的选择,而且它很容易让我看到为什么php和perl这个

类任务更受欢迎。也许这只是我的看法。


我觉得包含一些可选的方法来阻止代码将是一个很大的步骤,以便更广泛地采用该语言在网站开发和

一般。我确实理解,目前的严格缩进

是该语言核心的一部分,所以...想法?

I was considering putting together a proposal for an alternate block
syntax for python, and I figured I''d post it here and see what the
general reactions are. I did some searching, and while I found a lot
of tab vs space debates, I didn''t see anything like what I''m thinking
of, so forgive me if this is a very dead horse.

Generally speaking, I like the current block scheme just fine. I use
python on a daily basis for system administration and text parsing
tasks, and it works great for me.

From time to time, though, I find myself needing a language for server-
side includes in web pages. Because of the need to indent (and
terminate indents), python seems an awkward choice for this, and it''s
easy for me to see why php and perl are more popular choices for this
kind of task. Perhaps this is just my perception though.

I feel that including some optional means to block code would be a big
step in getting wider adoption of the language in web development and
in general. I do understand though, that the current strict indenting
is part of the core of the language, so... thoughts?

推荐答案

Eric Wertman schrieb:
Eric Wertman schrieb:

我正在考虑为一个替代块提出一个建议

python的语法,我想我会在这里发布,看看

的一般反应是什么。我做了一些搜索,虽然我发现很多

的标签与空间辩论,但我没有看到任何像我在想的那样

,所以如果这是一匹非常死马,请原谅我。
I was considering putting together a proposal for an alternate block
syntax for python, and I figured I''d post it here and see what the
general reactions are. I did some searching, and while I found a lot
of tab vs space debates, I didn''t see anything like what I''m thinking
of, so forgive me if this is a very dead horse.



你提出改变py3k肯定为时已晚。

You are definitely too late to propose a change for py3k.


我觉得包括一些可选项意味着阻止代码将是一个很大的步骤,以便在Web开发中广泛采用该语言,并且通常会花费b $ b。我确实理解,目前的严格缩进

是语言核心的一部分,所以...想法?
I feel that including some optional means to block code would be a big
step in getting wider adoption of the language in web development and
in general. I do understand though, that the current strict indenting
is part of the core of the language, so... thoughts?



为什么Python要重复其他语言使用SSI或

<?php?内联代码所犯的错误? Python支持MVC分离代码和布局。


Christian

Why should Python repeat the mistakes other languages did with SSI or
<?php ?inline code? Python favors the MVC separation of code and layout.

Christian


4月20日,11:35 *我,Eric Wertman< ewert ... @ gmail.comwrote:
On Apr 20, 11:35*am, Eric Wertman <ewert...@gmail.comwrote:

我正考虑整理一个替代块的建议

python的语法,我想我会在这里发布它,看看

的一般反应是什么。 *我做了一些搜索,虽然我发现很多

的标签与空间辩论,但我没有看到任何像我在想的那样

,如果这是一匹非常死马,请原谅我。
I was considering putting together a proposal for an alternate block
syntax for python, and I figured I''d post it here and see what the
general reactions are. *I did some searching, and while I found a lot
of tab vs space debates, I didn''t see anything like what I''m thinking
of, so forgive me if this is a very dead horse.



[向Monty Python道歉]


这匹马不再!他已不复存在! ''E'已经过期并且去了

见面''是制造商! ''E'很僵硬!失去生命,'e安息!这个

是一个EX-HORSE !!


:)

[with apologies to Monty Python]

This horse is no more! He has ceased to be! ''E''s expired and gone to
meet ''is maker! ''E''s a stiff! Bereft of life, ''e rests in peace! THIS
IS AN EX-HORSE!!

:)


一般来说,我就像目前的街区计划一样好。 *我每天使用

python进行系统管理和文本解析

任务,这对我很有用。


但是,我发现自己需要一种语言服务器 -

包含在网页中。 *由于需要缩进(和

终止缩进),python似乎是一个尴尬的选择,而且它很容易让我看到为什么php和perl是这个

类任务的更受欢迎的选择。 *也许这只是我的看法。
Generally speaking, I like the current block scheme just fine. *I use
python on a daily basis for system administration and text parsing
tasks, and it works great for me.

From time to time, though, I find myself needing a language for server-
side includes in web pages. *Because of the need to indent (and
terminate indents), python seems an awkward choice for this, and it''s
easy for me to see why php and perl are more popular choices for this
kind of task. *Perhaps this is just my perception though.



查看通常用于此类任务的十几个基于Python的模板引擎中的任何一个;它们提供了比

缩进块更多的功能。


George

Look into any of the dozen Python-based template engines that are
typically used for such tasks; they offer many more features than a
way to indent blocks.

George



查看通常用于此类任务的十几个基于Python的模板引擎中的任何一个;它们提供了许多功能而不是

缩进块的方式。


George
Look into any of the dozen Python-based template engines that are
typically used for such tasks; they offer many more features than a
way to indent blocks.

George



I肯定会..你可以抛出一些例子吗?

谢谢!


Eric

I definitely will.. could you throw out some examples though?
Thanks!

Eric


这篇关于python 3000的替代缩进建议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆