"RG" wrote in message
news:rnospamon-ee76e8.18291912102...@news.albasani.net...
In article ,
"BartC" wrote:
"RG" wrote in message
> Likewise, all of the following are the same number written in different
> notations:
>
> pi/2
> pi/2 rad
e largest "c" you will
need by computing the square root of a*a+b*b.
If square roots have to be used, you might as well use the two-loop
algorithm, as you're nearly there.
A simpler estimate for the largest c is just a+b, although it might involve
a few extra iterations.
verse()
f.close()
g=open("file2","w")
g.writelines(lines)
g.close()
--
Bartc
--
https://mail.python.org/mailman/listinfo/python-list
On 12/02/2017 21:46, Christian Gollwitzer wrote:
Am 12.02.17 um 22:07 schrieb BartC:
On 12/02/2017 20:38, Christian Gollwitzer wrote:
Am 12.02.17 um 21:19 schrieb Paolo:
Buonasera, è da un pò che sto cercando come esercizio di scrivere un
file al contrario.
Mi spiego meglio ho un file con N
e window that
would then promptly disappear if it finished immediately and there was
no interaction.
--
bartc
--
https://mail.python.org/mailman/listinfo/python-list
for
suggesting the tab width (or set of tab stops) that is recommended (eg.
a comment at the top).
--
bartc
--
https://mail.python.org/mailman/listinfo/python-list
On 20/03/2017 14:32, Chris Angelico wrote:
On Tue, Mar 21, 2017 at 1:24 AM, BartC wrote:
But it would be better IMO if tabs were used, with some scheme for
suggesting the tab width (or set of tab stops) that is recommended (eg. a
comment at the top).
If you absolutely have to, then sure, put
l path of one file, as the part of the
filename of another; is each "/" a separator, or part of the embedded path?
Anyway, I'm sure out of the million unicode characters, there must be
something that /looks/ like a stroke, but isn't a stroke. Just to add to
the confusion.
--
bartc
--
https://mail.python.org/mailman/listinfo/python-list
on other than dynamic
variables as I said.
So such things can be made viable with the proper language support
rather than relying on layers of what I consider unnecessarily esoteric
features. Get the basics working first.
--
bartc
--
https://mail.python.org/mailman/listinfo/python-list
On 10/04/2017 03:40, Rick Johnson wrote:
On Sunday, April 9, 2017 at 1:34:39 PM UTC-5, bartc wrote:
I have my own interpreted language which I call 'dynamic',
but compared with Python, code in it might as well be set
in concrete.
Is this a personal toy, or something that you c
y groaning under the weight of add-ons. And you don't want a
feature that adds clutter that is only there for performance hints.
Well, a little clutter might be OK:
constant pi = 3.14159
Now 'pi' is /guaranteed/ to be the value you've specified (unlike
math.pi). That sort of thing can help optimisation /and/ readability.
--
bartc
--
https://mail.python.org/mailman/listinfo/python-list
ms - half of which is
generating that damned asm source - was from yesterday!)
However, when the obstacle is a particular language design then the
options are more limited. I think CPython does remarkably well given the
language. And the official byte-code (which can do with tweaking as tha
orth the bother.
I think x+=y is most usefully optimised when x and y are numbers. But
numbers can't be modified in-place, not in general.
--
bartc
--
https://mail.python.org/mailman/listinfo/python-list
On 13/04/2017 12:55, bartc wrote:
On 13/04/2017 09:08, Steven D'Aprano wrote:
Is it possible to skip the STORE_NAME op-code?
If the starting-point is the existing byte-code of a program, then what
can be done is more limited.
If the optimiser can generate new byte-codes, then it mig
might be a better idea to have a multi-level loop break then. This
would also be an absolute jump byte-code.
--
bartc
--
https://mail.python.org/mailman/listinfo/python-list
On 13/04/2017 16:03, Ian Kelly wrote:
On Thu, Apr 13, 2017 at 8:52 AM, bartc wrote:
On 13/04/2017 15:35, Chris Angelico wrote:
Personally, I can't remember the last time I yearned for "goto" in
Python, and the only times I've ever wished for it or used it in other
langu
On 13/04/2017 22:58, Ian Kelly wrote:
On Thu, Apr 13, 2017 at 3:27 PM, Dennis Lee Bieber
wrote:
On Thu, 13 Apr 2017 15:52:24 +0100, bartc declaimed the
following:
'goto' would be one easy-to-execute byte-code; no variables, objects or
types to worry about. If implemented properly
On 14/04/2017 02:44, Steve D'Aprano wrote:
On Fri, 14 Apr 2017 12:52 am, bartc wrote:
I know this isn't the Python need-for-speed thread, but this is a
classic example where the lack of one simple feature leads to using
slower, more cumbersome ones.
Dear gods, have I fallen back
0))
Those are fine. I means when lots of things are arranged on one line,
where the output of one method feeds into the next.
Vertical space is free after all.
However, you might argue that having discrete, intermediate steps would
be a little slower than one-lining..
--
bartc
--
https://mail.python.org/mailman/listinfo/python-list
On 14/04/2017 11:56, Chris Angelico wrote:
On Fri, Apr 14, 2017 at 8:42 PM, bartc wrote:
Classes and decorators are not esoteric. You sound like an old man who
complains about this new-fangled "telephone", and how things were so much
better when we had messenger boys to delive
ot;current integer
value" by 1
I don't know if it's possible to override __iadd__ for integers so that
+=1 does something different here.
But if there is any code between answer=0 and the start of the loop,
then there is the possibility that answer could be something differe
And one day it will be:
while l:
body
that can be mistaken for that common idiom.
--
bartc
--
https://mail.python.org/mailman/listinfo/python-list
On 15/04/2017 14:27, Marko Rauhamaa wrote:
bartc :
while 1:
body
Why not say it like it is:
while True:
body
but it's more psychological; I don't want to use an idiom to denote an
endless loop, I want to be able to express it directly!
C
But it doesn't
matter as I can use the ASM version for speed.
I believe CPython also makes use of label-pointers when compiled with
gcc - as happens on Linux - but not when compiled with MSVC, so that
CPython on Windows is a little slower for that reason. I don't know if
On 16/04/2017 03:51, Steve D'Aprano wrote:
On Sat, 15 Apr 2017 10:17 pm, bartc wrote:
Yes, I'm constantly surprised at this, as such syntax has a very low
cost (in my last compiler, supporting 'while' for example only added 30
lines to the project).
That's the adva
On 16/04/2017 13:22, Rustom Mody wrote:
On Sunday, April 16, 2017 at 5:36:28 PM UTC+5:30, bartc wrote:
On 16/04/2017 03:51, Steve D'Aprano wrote:
On Sat, 15 Apr 2017 10:17 pm, bartc wrote:
Yes, I'm constantly surprised at this, as such syntax has a very low
cost (in my las
On 16/04/2017 16:00, justin walters wrote:
On Sun, Apr 16, 2017 at 3:55 AM, bartc wrote:
Example C of the same silly program in Python:
def add(a,b):
return a+b
def testfn():
sum=a=b=0
for i in range(1):
sum += add(a,b)
a += 1
b += 2
print (a
On 16/04/2017 15:22, Chris Angelico wrote:
On Sun, Apr 16, 2017 at 11:57 PM, bartc wrote:
Technically, adding this one feature to Python /is/ trivial, for example,
allowing while: as a synonym for while True:, but preferably using a new
keyword such as loop. Nothing else needs to be touched
On 16/04/2017 17:30, Steve D'Aprano wrote:
On Sun, 16 Apr 2017 10:06 pm, bartc wrote:
(The 30 Loc figure is with support for loops /in
general/ already in place, and is for /adding/ a new loop statement, in
this case 'while')
What part of *testing* and *documenting* do you
On 16/04/2017 18:13, Steve D'Aprano wrote:
On Mon, 17 Apr 2017 02:20 am, justin walters wrote:
On Sun, Apr 16, 2017 at 8:46 AM, bartc wrote:
What were the results with Python on your machine?
Well, at first I tried to implement it with a generator. I gave up on
waiting for the pr
On 16/04/2017 20:00, Chris Angelico wrote:
On Mon, Apr 17, 2017 at 4:43 AM, bartc wrote:
Sure! If all you care about is winning benchmarks,
The benchmarks should be about comparing things. But they have to be
like for like.
Since this was about the effects of type annotations, it would
On 16/04/2017 19:42, Chris Angelico wrote:
On Mon, Apr 17, 2017 at 4:21 AM, bartc wrote:
Here is a function from some old CPython source that appears to be something
to do with While statements:
static int
validate_while(node *tree)
{
...
Look, no comments! Are you going to castigate the
uses to make use of it. Plus Python programmers may
be more averse to using convoluted logic just to avoid a 'break' in the
middle of a loop.
--
bartc
--
https://mail.python.org/mailman/listinfo/python-list
ces). Those 3 extra lookups per loop
I guess (this was run inside a function otherwise the dynamics are
different).
--
bartc
--
https://mail.python.org/mailman/listinfo/python-list
ot be
worthwhile using 'official' byte-codes.)
--
bartc
--
https://mail.python.org/mailman/listinfo/python-list
.
But you would reduce two lookups to one, so the gains might be greater
with those more elaborate accesses.
--
bartc
--
https://mail.python.org/mailman/listinfo/python-list
On 18/04/2017 23:33, Erik wrote:
On 18/04/17 11:30, bartc wrote:
On 18/04/2017 10:32, Erik wrote:
the
improvements over the original huge switch() to dispatch the bytecodes
to the correct handler appear to have made this type of optimization
less effective.
What did they do to it, and on
On 19/04/2017 00:19, Gregory Ewing wrote:
bartc wrote:
Another optimisation for something like ADD, was to to check for very
common types such as INT, and deal with those locally.
And then you're on the path to writing a JIT compiler. If you
can identify such cases, you might as
On 19/04/2017 01:07, Erik wrote:
On 19/04/17 00:33, bartc wrote:
[Talking about an interpreter that is /not/ for Python]
With the sort of lower level programs I write (in another dynamic
language not Python), such an assembly layer improved performance 2-3
times over using 100% HLL compiled
On 19/04/2017 12:27, Chris Angelico wrote:
On Wed, Apr 19, 2017 at 8:33 PM, bartc wrote:
[Warning: this is nothing to do with Python.]
My interpreter is on github as /one/ C source file (a link would be
inappropriate here). People can compile it with -O3 or -O2 if they wish.
It's
On 19/04/2017 15:35, Chris Angelico wrote:
On Wed, Apr 19, 2017 at 11:46 PM, bartc wrote:
You'd be surprised how easy it is to be non-OS-neutral.
I misread that as 'easy to be OS-neutral'. If I turn it around, you're
saying it is easy to be OS-specific. But we know t
On 19/04/2017 17:23, Marko Rauhamaa wrote:
bartc :
Enough works in that 'pcc' project, in terms of file i/o, that it can
still run plenty of useful programs, such as compilers.
This might have come up before, but do you have a language specification
somewhere?
(Nothing formal nor
r a new list is returned with the elements sorted.)
--
bartc
--
https://mail.python.org/mailman/listinfo/python-list
it doesn't seem to work. I
thought it might use advanced Python features I didn't know about.
--
bartc
(Regarding this particular task, one of my languages has it built-in
(for a 'set' object not a list):
println [0, 1, 2, 4, 6, 7, 8, 11, 12, 14,
15, 16, 17
atever was used above.
(There was a short-lived language actually called 'Babbage', which I
once implemented, although I doubt the man himself would have made much
of it. But he might have been p*ssed off that it wasn't quite as
successful as 'Ada', named after his prog
you can get within a factor of 2x easily even with poor code).
But again, in order to get something working, when the alternative is
having nothing working, then that can be acceptable as a temporary
workaround.
(Note that I am talking about a compiler written in /any/ language, but
that would
label pointers. I
believe that CPython makes use of label pointers with gcc to get an
extra boost.
--
bartc
--
https://mail.python.org/mailman/listinfo/python-list
On 16/05/2017 21:18, breamore...@gmail.com wrote:
On Tuesday, May 16, 2017 at 5:09:34 PM UTC+1, bartc wrote:
I can't test with Python because it's too complicated to compile,
especially on Windows.
What is the problem with the documentation given here
https://docs.python.or
On 16/05/2017 22:18, Chris Angelico wrote:
On Wed, May 17, 2017 at 7:14 AM, bartc wrote:
That PCbuild line is step 3 of Quick Start. You have to get past steps 1 and
2 first. It talks about something called Git; I don't know what that is or
what I'm supposed to do with it, but i
On 16/05/2017 23:15, breamore...@gmail.com wrote:
On Tuesday, May 16, 2017 at 10:19:06 PM UTC+1, Chris Angelico wrote:
On Wed, May 17, 2017 at 7:14 AM, bartc wrote:
That PCbuild line is step 3 of Quick Start. You have to get past steps 1 and
2 first. It talks about something called Git; I
On 16/05/2017 23:33, Chris Angelico wrote:
On Wed, May 17, 2017 at 8:17 AM, bartc wrote:
Then you are stuck in your own little bubble. That's fine as long as
you never try to foist your software OR your system on anyone else.
The rest of us collaborate with other people.
Other peopl
On 17/05/2017 00:42, Michael Torrie wrote:
On 05/16/2017 05:01 PM, bartc wrote:
It should be a piece of cake, yes?
If TCC implements the standard sufficiently, then yes it's possible.
However it won't be easy because the Python build tools are geared
towards the dominant compiler
On 17/05/2017 00:24, Chris Angelico wrote:
On Wed, May 17, 2017 at 9:01 AM, bartc wrote:
You mean like wheel files? Yeah, whodathunk. They don't need a C
compiler or anything.
I don't know if that's the same kind of thing. I'm not talking about
something like a bi
On 17/05/2017 02:18, Chris Angelico wrote:
On Wed, May 17, 2017 at 10:41 AM, bartc wrote:
On 17/05/2017 00:24, Chris Angelico wrote:
On Wed, May 17, 2017 at 9:01 AM, bartc wrote:
You mean like wheel files? Yeah, whodathunk. They don't need a C
compiler or anything.
I don'
On 17/05/2017 13:35, Rhodri James wrote:
On 17/05/17 01:41, bartc wrote:
As a cross-platform developer, I find your naivity refreshing. If only
life were so simple.
When you develop code yourself, you can lay out your files however you
find most convenient, code to the foibles of your
On 17/05/2017 14:53, bartc wrote:
Note: none of these three projects is written in C. C is used as an
intermediate language for the convenience, for ...
For the 'convenience of others' that should be before it was badly edited.
Not for me, as using C, even just generating C, is a p
On 17/05/2017 15:13, Chris Angelico wrote:
On Wed, May 17, 2017 at 11:53 PM, bartc wrote:
That's all true. But the answer is not to make it a nightmare for everyone
else as well as yourself. If the requirement is to get other people to build
your product from source for the purpose of
On 17/05/2017 16:06, Rhodri James wrote:
On 17/05/17 14:53, bartc wrote:
It doesn't work. I can post something that is easy to compile, but
someone is going to say, Ah, but it doesn't do this, it doesn't do that,
it doesn't work on X...
"Few people seem to see
On 17/05/2017 17:23, Chris Angelico wrote:
On Thu, May 18, 2017 at 1:37 AM, bartc wrote:
On 17/05/2017 15:13, Chris Angelico wrote:
[1] Does work on Windows. Install bash for Windows, or (on a
recent-enough Windows) just use the subsystem that Microsoft provides.
So the answer is, switch
On 17/05/2017 21:05, breamore...@gmail.com wrote:
On Wednesday, May 17, 2017 at 8:32:40 PM UTC+1, bartc wrote:
On 17/05/2017 17:23, Chris Angelico wrote:
On Thu, May 18, 2017 at 1:37 AM, bartc wrote:
On 17/05/2017 15:13, Chris Angelico wrote:
[1] Does work on Windows. Install bash for
On 17/05/2017 21:17, Michael Torrie wrote:
On 05/17/2017 01:32 PM, bartc wrote:
Sometimes, if there's a problem. But usually the code is doing something
sensible. The stuff in configure is complete gobbledygook (if anyone
doesn't believe me, just have look).
Well trying to edit an
On 17/05/2017 21:39, Chris Angelico wrote:
On Thu, May 18, 2017 at 5:32 AM, bartc wrote:
It is impossible that all this is needed just to figure out what source
files need to be compiled. (If it generated CPython sources fractal-style,
then I might be impressed, but doesn't.)
I lov
On 17/05/2017 22:40, Chris Angelico wrote:
On Thu, May 18, 2017 at 6:52 AM, bartc wrote:
determines whether your system has the required
compilers and libraries, figures out what source files should be
compiled, and calculates the order in which to build the source files.
Yes! That's w
e else's?
I'm not the author of Tiny C, so I wouldn't know.
My own approach with the standard library is that I just use what is
provided by the OS (so msvcrt.dll or libc.so.6).
I expect Tiny C does the same as it doesn't appear to come with any
libraries of its own.
On 17/05/2017 23:32, Chris Angelico wrote:
On Thu, May 18, 2017 at 8:21 AM, bartc wrote:
My own approach with the standard library is that I just use what is
provided by the OS (so msvcrt.dll or libc.so.6).
I expect Tiny C does the same as it doesn't appear to come with any
libraries o
r/qlang/qcc64.c
https://github.com/bartg/langs/blob/master/qlang/pcc64.c
The first is a compiler, the second an interpreter. They need to be
built for a system with 64-bit pointers (as these aren't original
sources but intermediate code targetted at 64-bit C).
>Or for som
On 18/05/2017 07:13, Steven D'Aprano wrote:
On Thu, 18 May 2017 02:12:58 +0100, bartc wrote:
A portable C application should run anywhere there is a C compiler.
Ha, somebody believed the advertising hype that C is a portable, write-
once-run-anywhere language.
Maybe somebody can t
On 18/05/2017 12:37, Rhodri James wrote:
On 18/05/17 02:12, bartc wrote:
So tell us Bart, what do you think are the chances that your Q
compiler will
*just work* with no modifications at all if somebody tried to build
it on
an IBM AS/400, or under BeOS?
Maybe somebody can try it:
https
On 18/05/2017 15:32, Ian Kelly wrote:
On Thu, May 18, 2017 at 8:02 AM, bartc wrote:
On 18/05/2017 12:37, Rhodri James wrote:
but (a) you have no leg to stand on
criticising configure scripts with that file,
You think so?
After the first 50 lines, there are no #includes, no #defines, no
On 18/05/2017 18:11, Steve D'Aprano wrote:
On Thu, 18 May 2017 11:38 pm, bartc wrote:
Speaking of user-hostile experiences, why do you need separate source
files for 32- and 64-bit builds? Why isn't it just a build option?
I've never heard of people using separate source code
On 18/05/2017 19:17, bartc wrote:
On 18/05/2017 18:11, Steve D'Aprano wrote:
unsafe dereferencing of type-punned pointers, missing parentheses,
suggested parentheses not missing.
And they are suggested because, in C, when people write a<sometimes have assumed it means (a<
Si
r will not
detect it as it is perfectly legal, meanwhile it will deluge you with
hundreds of pointless warnings.
In my original language, such a mixup is illegal. So, do you still trust
a C compiler more? The language is inherently unsafe.
--
bartc
--
https://mail.python.org/mailman/listinfo/python-list
ocess:
PCbuild\build.bat -e -d
is too complicated.
You're right of course. But it makes you wonder then why they bother
making available binary builds of Python for Windows, when someone just
needs to enter a simple command and it will effortlessly build you a
customised version from
On 18/05/2017 21:12, Chris Angelico wrote:
On Fri, May 19, 2017 at 5:29 AM, bartc wrote:
"largely" verified. Can you be absolutely certain that not one of
these compiler-detected issues is actually a problem? Would you stake
your life on it - for example, would you compile this co
On 18/05/2017 18:11, Steve D'Aprano wrote:
On Thu, 18 May 2017 11:38 pm, bartc wrote:
Seems a bit hypocritical, don't you think? Expecting people to go spelunking
into your undocumented mystery language source code to work out how to
build it from source, and then turning
On 19/05/2017 04:31, Steve D'Aprano wrote:
On Fri, 19 May 2017 04:17 am, bartc wrote:
There is one uninitialised variable reported. And that is used only in
an error situation. But yes, that was a mistake.
"Only one"?
Its a bit naughty to claim "one" un
hon.exe would be a useful first step, even if it fails to run for
many other reasons.
Once this exercise can be done for a compiler which is expected to (ie.
gcc) /then/ it would be possible to try with another.
--
Bartc
--
https://mail.python.org/mailman/listinfo/python-list
On 19/05/2017 12:41, Steve D'Aprano wrote:
On Fri, 19 May 2017 08:36 pm, bartc wrote:
Which gcc version? I can't get mine (5.1.0) to report any of these, even
with -Wall -Wextra -Wpedantic.
[steve@ando langs]$ gcc --version
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55)
Interesting
On 19/05/2017 19:53, eryk sun wrote:
On Fri, May 19, 2017 at 1:57 PM, bartc wrote:
The 'improvement' seems to involve making things more complicated rather
than less.
You don't need a full Visual Studio 2015 installation. You can install
Visual C++ 2015 Build Tools [1],
On 19/05/2017 12:00, bartc wrote:
These are the binary files on my Python 3.4 system:
python.exe
pythonw.exe
DLLs/pyexpat.pyd
DLLs/python3.dll
...
So, which sources are needed to compile and link python.exe for example?
Which headers or other files need to be synthesised for them [to] be
herwise we
wouldn't have fast processors, fast memory, fast storage, fast
connections, nor super-optimising compilers.
And we wouldn't have people spending considerable efforts on tracing
JITs as used for Javascript or the PyPy project for Python.
--
bartc
--
https://mail.python.org/mailman/listinfo/python-list
to get anything more
than a basic eyeballing of the code.
Try running the program.
(I did that but I can't follow this style of coding so can't help.)
--
bartc
--
https://mail.python.org/mailman/listinfo/python-list
On 20/05/2017 14:49, Steve D'Aprano wrote:
On Sat, 20 May 2017 09:13 pm, bartc wrote:
Try running the program.
(I did that but I can't follow this style of coding so can't help.)
Chris is within his rights to refuse to run untrusted code downloaded over
the internet.
It
will still moan that it's too complex. You've reduced
the job of building a set of kitchen units to hammering in just one
nail, but then find that someone has never hammered a nail in before.
I'm now investigating how to reduce a project to no files at all!)
--
bartc
--
https://mail.python.org/mailman/listinfo/python-list
On 20/05/2017 19:37, Chris Angelico wrote:
On Sun, May 21, 2017 at 4:11 AM, bartc wrote:
(Which is exactly what I strive to do. Although my projects are small, they
could still involve dozens of source and support files, and require running
non-standard tools to build, which would then
ble at compile-time, when type hints could best be
put to good effect.
Furthermore, both A, and the type-hinting code, might be conditional. So
that on Tuesdays, A is a class, the rest of the week it's the name of a
module.
Python doesn't make things easy.
--
bartc
--
https://mail
ng files for every conceivable machine in the same place - is not
scalable.)
--
bartc
--
https://mail.python.org/mailman/listinfo/python-list
result might run at half the speed is irrelevant.
(Not such good news for me, as now I feel obliged to make my own C
compiler manage it. And it sort of competes with tcc for compilation
speed (and size too but that wasn't intentional). However it lacks some
C99 features
On 21/05/2017 12:06, Chris Angelico wrote:
On Sun, May 21, 2017 at 8:23 PM, bartc wrote:
(If you imagine a future where the number of targets has increased a
hundred-fold (or we colonise the galaxy and there are a million possible
targets), then it might become clearer that the approach used
On 21/05/2017 17:51, breamore...@gmail.com wrote:
On Saturday, May 20, 2017 at 10:56:17 PM UTC+1, bartc wrote:
I am still also sticking with the belief that you know about as much
about programming as the RUE knows about unicode. What major projects
have you worked on? Actually what have
On 21/05/2017 16:21, Chris Angelico wrote:
On Mon, May 22, 2017 at 12:58 AM, bartc wrote:
On 21/05/2017 12:06, Chris Angelico wrote:
Explain why ALL these drivers, including the one I've just created, need to
be part of the common source code for the OS.
I don't know. YOU are t
On 21/05/2017 21:46, Chris Angelico wrote:
On Mon, May 22, 2017 at 5:32 AM, bartc wrote:
Why are you so afraid of
multiple source files?
[When other people build your app from sources]
Because then they are likely to need automation to deal with it. And
that introduces an extra
On 22/05/2017 01:07, Gregory Ewing wrote:
is not easy, but nobody should *need* to do that unless they're
--
https://mail.python.org/mailman/listinfo/python-list
n the cards to have a streamlined CPython
distribution that only had a C compiler as a requirement, and nothing
else. Unless I'm missing something.
--
Bartc
--
https://mail.python.org/mailman/listinfo/python-list
- It's not enforced nor checked by the language, it's only to aid
readability, so ends may be placed incorrectly or left out
- Multple ends on one line need a comma separator:
end, end, end
- No one actually does this so it can't solve any of the problems
people might h
.
(But this won't work if there are gaps in the sequence or the numeric
format is variable.)
--
bartc
--
https://mail.python.org/mailman/listinfo/python-list
On 24/05/2017 16:41, Peter Otten wrote:
Dennis Lee Bieber wrote:
On Tue, 23 May 2017 21:42:45 +0100, bartc declaimed the
following:
Is it necessary to sort them? If XXX is known, then presumably the first
file will be called XXX_chunk_0, the next XXX_chunk_1 and so on.
XXX_chunk_1
ecause then we have to deal with different scopes, name lookups, and
named constants defined inside a module or class so requiring an
attribute lookup.
Ideally a named constant would be instantly mapped to the equivalent
literal, and done during compilation. Then a range of optimisations also
b
On 24/05/2017 23:59, Gregory Ewing wrote:
bartc wrote:
Yet the language will stop you assigning to 672, or "abc".
Maybe the language could have been made even smaller if that was not
checked; after all the developer ought to be trusted not to assign to
them!
I'm told th
te that compiled as C++, I think this has to fail (because string
literals have slightly different types compared with C).
--
bartc
--
https://mail.python.org/mailman/listinfo/python-list
1001 - 1100 of 1116 matches
Mail list logo