English 中文(简体)
是否有一个在一线开始时消耗“物理”横向空间的统法协会空间焦炭,但NOT是否表示是“逻辑”的 in?
原标题:Is there a Unicode space char that consumes "physical" horizontal space at the start of a line but does NOT signify a "logical" indent to Python?

www.un.org/Depts/DGACM/index_french.htm 我最近出版了一个介绍性节目:textbook ,遵循一种语言-agnostic办法。 虽然“通知一”的使用是 Java的一个小小小段,但该书的设想是,这基本上是所有必需的方案拟订语文的普遍分集,附录显示,将实例绘制成(say) 戴维·贾瓦伦文或C++所需的小改动。

该书广泛使用登革热,以显示在规范方面的完善等级,其中评论用于规格。 例如,第1章载有这个例子:

     /* Output the Integer Square Root of an integer input. */
        /* Obtain an integer n≥0 from the user. */
           int n = in.nextInt();
        /* Given n≥0, output the Integer Square Root of n. */
           /* Let r be the integer part of the square root of n≥0. */
              int r = 0;
              while ( (r+1)*(r+1) <= n ) r++;
           System.out.println( r );

<>Connundrum。 直到现在,我一直忽视的是,在我利用tation来显示完善的等级(如上所述)和用 Python作为辛子之间,似乎存在着根本的不相容性。 具体而言,我(工作)的取样法是:

    # Output the Integer Square Root of an integer input.
      # Obtain an integer n≥0 from the user.
    n = int(input())
      # Given n≥0, output the Integer Square Root of n.
        # Let r be the integer part of the square root of n≥0.
    r = 0
    while ( (r+1)*(r+1) <= n ):
        r = r + 1
    print( r )

问题在于,对于潜水法(即与等级的调整相一致)来说,似乎不会有任何动向,并且把恩塔的登革热解释为 s! 我的书本中使用迟tation来显示改进是很普遍的,因此,除非我找到解决办法,否则我似乎会感到迷惑。

http://www.ohchr.org。 我似乎需要的是统法协会的空间特性,可以在一行之初用于“实际”创造白色空间,但为了确定“逻辑”登革热,或作为随后的识别特征的特性,这种空间被斯达尔文编辑所忽略。 迄今为止,我没有发现这种特性。

是否有人提出建议?

我在“n=int(投入)”之前尝试使用空洞特性(如空洞char器.com)。 它被忽略为“逻辑上的”登革,在编辑中被展示为红衣,然后被汇编者记为“身份识别特征”。

问题回答

rel=“nofollow noreferer” 甲型六氯环己烷/甲型六氯环己烷等异构体细节,具体来说,什么是有效的内附剂。 我对斯达尔肯泽斯的解读是,whitespace natures 是简短的。 因此,你似乎喜欢用标准语言脱掉uck。

,这两份答复是关于将影印块添加到Sharma,但这种表面上的侵扰和可能有许多工作来更新您的每一个实例。

甲胺是一种动态语言,可以加以修改,并且可以使用进口hoo子修改进口代码。 见here。 例如,你自己的下游读者或许可以 strip掉我们的统法协会的习惯空间?

当然,这取决于你对你的书籍拥有多少控制权(以及你愿意为行使这一控制权而投入多少努力),没有任何人说,这本书的格式必须与法典的tation调相称。

(鉴于你的书本意在作为方案拟订的导言,而且由于重要的白色空间是沙尔发展的一个基本部分,我不敢肯定,如果使用非标准白天空间的话,会给读者带来好处。)

我很抱歉说,我已经得出结论,使用(物理)诱导显示精炼等级、使用(逻辑)tation作为辛子之间存在根本不兼容。 这里是我的分析。

首先,仅从我的榜样中考虑《普思松法典》:

n = int(input())
r = 0
while ( (r+1)*(r+1) <= n ):
    r = r + 1
print( r )

除休息室外,所有线路都停在“顶级”内,因此,只有(从逻辑上)宽松。

但是,考虑到一种反映等级完善的冷淡风格。 本公约旨在允许在任意细节上理解一项方案,其中评论可以发挥可执行规格的作用,而执行这些规范,即改进,却被削弱。 这种冷漠是一种代谢物,可在(say)一名编辑(例如,)中提供。

# Output the Integer Square Root of an integer input.

# Output the Integer Square Root of an integer input.
  # Obtain an integer n≥0 from the user.
  # Given n≥0, output the Integer Square Root of n.

# Output the Integer Square Root of an integer input.
  # Obtain an integer n≥0 from the user.
  # Given n≥0, output the Integer Square Root of n.
    # Let r be the integer part of the square root of n≥0.
    print( r )

# Output the Integer Square Root of an integer input.
  # Obtain an integer n≥0 from the user.
    n = int(input())
  # Given n≥0, output the Integer Square Root of n.
    # Let r be the integer part of the square root of n≥0.
    print( r )

# Output the Integer Square Root of an integer input.
  # Obtain an integer n≥0 from the user.
    n = int(input())
  # Given n≥0, output the Integer Square Root of n.
    # Let r be the integer part of the square root of n≥0.
      r = 0
      while ( (r+1)*(r+1) <= n ):
        r = r + 1
    print( r )

Notice that the top-level lines of Phython code are (phyically) indented various different amounts. I don t see any way that one can get that effect (say) by using the s或t of special character that I previously proposed (signified by _).

Unless I m missing something, I am sadly f或ced to conclude that Python s use of indenting as syntax precludes showing the indented refinement hierarchy in the manner I want.

Thanks to @slothrop and all others f或 your help.





相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...

热门标签