Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <uuntos$15o0k$1@dont-email.me>
Deutsch   English   Français   Italiano  
<uuntos$15o0k$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: DFS <nospam@dfs.com>
Newsgroups: comp.os.linux.advocacy
Subject: Re: Tabs As Syntax
Date: Fri, 5 Apr 2024 00:13:14 -0400
Organization: A noiseless patient Spider
Lines: 118
Message-ID: <uuntos$15o0k$1@dont-email.me>
References: <17be73f7d87a06e9$246570$4075406$802601b3@news.usenetexpress.com>
 <utejt0$1fq95$1@dont-email.me> <utfstp$1pfg9$2@dont-email.me>
 <utumm9$1s41o$2@dont-email.me> <uuj10i$3phh2$4@dont-email.me>
 <uujvdj$19sa$1@dont-email.me> <uuni3g$vbtu$3@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 05 Apr 2024 04:13:16 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="b0d848596cf862a6f355d05076c5be24";
	logging-data="1237012"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19gnd5WGgPm1xfLrp0jbR2L"
User-Agent: Betterbird (Windows)
Cancel-Lock: sha1:i3K/MuWrFF1XI2+eBYwG/7q61bQ=
Content-Language: en-US
In-Reply-To: <uuni3g$vbtu$3@dont-email.me>
Bytes: 4699

On 4/4/2024 8:54 PM, Lawrence D'Oliveiro wrote:
> On Wed, 3 Apr 2024 12:16:50 -0400, DFS wrote:
> 
>> I cannot.
> 
> Here’s another example. First, without #end comments:
> 
>      class xattr(ct.Structure) :
>          _fields_ = \
>              [
>                  ("fsx_xflags", ct.c_uint32),
>                  ("fsx_extsize", ct.c_uint32),
>                  ("fsx_nextents", ct.c_uint32),
>                  ("fsx_projid", ct.c_uint32),
>                  ("fsx_cowextsize", ct.c_uint32),
>                  ("fsx_pad", 8 * ct.c_ubyte),
>              ]
> 
>          def copy(self) :
>              celf = type(self)
>              res = celf()
>              for f in celf._fields_ :
>                  setattr(res, f[0], getattr(self, f[0]))
>              return \
>                  res
> 
>          def __repr__(self) :
>              return \
>                  (
>                      "(%s)"
>                  %
>                      ", ".join
>                        (
>                              "%%s = %s" % ("%d", "%#0.8x")[f == "fsx_xflags"]
>                          %
>                              (f, getattr(self, f))
>                          for f in
>                              ("fsx_xflags", "fsx_extsize", "fsx_nextents", "fsx_projid", "fsx_cowextsize")
>                        )
>                  )
> 
>      XFLAG_REALTIME = 0x00000001
>      XFLAG_PREALLOC = 0x00000002
> 
> Where does the “xattr” class end? 

At the XFLAG REALTIME line.


> Does it include those symbolic parameters at the bottom?

No.


> Can you see that clearly? 

I can.


>Compare this way:
> 
>      class xattr(ct.Structure) :
>          _fields_ = \
>              [
>                  ("fsx_xflags", ct.c_uint32),
>                  ("fsx_extsize", ct.c_uint32),
>                  ("fsx_nextents", ct.c_uint32),
>                  ("fsx_projid", ct.c_uint32),
>                  ("fsx_cowextsize", ct.c_uint32),
>                  ("fsx_pad", 8 * ct.c_ubyte),
>              ]
> 
>          def copy(self) :
>              celf = type(self)
>              res = celf()
>              for f in celf._fields_ :
>                  setattr(res, f[0], getattr(self, f[0]))
>              #end for
>              return \
>                  res
>          #end copy
> 
>          def __repr__(self) :
>              return \
>                  (
>                      "(%s)"
>                  %
>                      ", ".join
>                        (
>                              "%%s = %s" % ("%d", "%#0.8x")[f == "fsx_xflags"]
>                          %
>                              (f, getattr(self, f))
>                          for f in
>                              ("fsx_xflags", "fsx_extsize", "fsx_nextents", "fsx_projid", "fsx_cowextsize")
>                        )
>                  )
>          #end __repr__
> 
>      #end xattr
> 
>      XFLAG_REALTIME = 0x00000001
>      XFLAG_PREALLOC = 0x00000002



I just don't have a problem following Python blocks.  Of course if they 
go more than one page it's tougher.

But go with what works for you.

My usual editor on Windows and WSL is Notepad++, and it has faint 
vertical lines called indent guides, corresponding with the tab widths, 
which makes the Python code (or any indented code, with or without 
brackets) a touch easier to follow.  They're on by default.

https://imgur.com/a/IqfufKA