On Sun, Dec 31, 2017 at 4:02 PM, Abdur-Rahmaan Janhangeer
wrote:
> for beginners import * is probably fine. Even if you are using most modules
> then too. else if module small maybe ok too
>
> just when you import just what you need, you save on resources .
>
Actually no; the entire module still
On Sat, Dec 30, 2017, at 23:57, jf...@ms4.hinet.net wrote:
> I have a multiline string, something like '''...\nf.write('\n')\n...'''
> when pass to exec(), I got
> SyntaxError: EOL while scanning string literal
>
> How to get rid of it?
Use \\n for this case, since you want the \n to be interpret
for beginners import * is probably fine. Even if you are using most modules
then too. else if module small maybe ok too
just when you import just what you need, you save on resources .
Abdur-Rahmaan Janhangeer,
Mauritius
abdurrahmaanjanhangeer.wordpress.com
On 31 Dec 2017 05:00, "Wu Xi" wrote:
great ! maybe the next step is a syntax coloriser ^^_
Abdur-Rahmaan Janhangeer,
Mauritius
abdurrahmaanjanhangeer.wordpress.com
On 31 Dec 2017 02:05, "Wu Xi" wrote:
> class writerKl(object):
> def __init__(self):
> import tkinter
> fromtkinter import messagebox
>
I have a multiline string, something like '''...\nf.write('\n')\n...'''
when pass to exec(), I got
SyntaxError: EOL while scanning string literal
How to get rid of it?
Best Regards,
Jach Fong
--
https://mail.python.org/mailman/listinfo/python-list
bartc writes:
> On 30/12/2017 20:36, Ben Bacarisse wrote:
>> bartc writes:
>>
>>> On 30/12/2017 16:53, mm0fmf wrote:
On 30/12/2017 14:41, bartc wrote:
> it looks a bit naff
Understatement of 2017.
>>>
>>> I'm honest about my own ideas, but my remarks were about the use of
>>>
from tkinter import *#I cant see
anything wrong with this , it works like a charm
from tkinter import messagebox #is there a
serious concern doing things his way ?
import asyncio , threading , random #
On 2017-12-30 23:22, Gregory Ewing wrote:
Stefan Ram wrote:
BASIC has
DEF FN...
which /can/ define actual subroutines, limited to expressions.
Now, what does this limitation remind me of?
The equivalent limitation in Python is nowhere near as bad,
since if you outgrow what lambda can
On Sun, Dec 31, 2017 at 10:45 AM, bartc wrote:
> On 30/12/2017 23:26, Gregory Ewing wrote:
>>
>> bartc wrote:
>>>
>>> B and C occur twice, so a goto is a quick way to reuse B and C without
>>> needing to duplicate code,
>>
>>
>> This only works if the repeated part happens to be at the
>> tail of
this is kinda interesting. seems there is no easy way though
--
https://mail.python.org/mailman/listinfo/python-list
On 30/12/2017 23:26, Gregory Ewing wrote:
bartc wrote:
B and C occur twice, so a goto is a quick way to reuse B and C without
needing to duplicate code,
This only works if the repeated part happens to be at the
tail of each case.
IME that seems to be the most common situation.
Any other si
bartc wrote:
B and C occur twice, so a goto is a quick way to reuse B and C without
needing to duplicate code,
This only works if the repeated part happens to be at the
tail of each case. Any other situation and you're back to
local functions.
--
Greg
--
https://mail.python.org/mailman/listinf
bartc wrote:
C doesn't in general have local functions. My own languages don't
implement them properly. So I tend not to use them.
Looks like there's something circular going on here. You don't
have much experience of using local functions, so you don't
see a lot of value in them, so you haven'
Stefan Ram wrote:
BASIC has
DEF FN...
which /can/ define actual subroutines, limited to expressions.
Now, what does this limitation remind me of?
The equivalent limitation in Python is nowhere near as bad,
since if you outgrow what lambda can do you can always
use a def instead. BASIC
On Sun, Dec 31, 2017 at 9:43 AM, bartc wrote:
> On 30/12/2017 20:36, Ben Bacarisse wrote:
>>
>> bartc writes:
>>
>>> On 30/12/2017 16:53, mm0fmf wrote:
On 30/12/2017 14:41, bartc wrote:
>
> it looks a bit naff
Understatement of 2017.
>>>
>>>
>>> I'm honest about m
On 30/12/2017 20:36, Ben Bacarisse wrote:
bartc writes:
On 30/12/2017 16:53, mm0fmf wrote:
On 30/12/2017 14:41, bartc wrote:
it looks a bit naff
Understatement of 2017.
I'm honest about my own ideas, but my remarks were about the use of
special symbols such as "::" and "@".
Before compl
nothing works in ure soft
everything breaks
--
https://mail.python.org/mailman/listinfo/python-list
that is a very slow manager. too slow.
--
https://mail.python.org/mailman/listinfo/python-list
class writerKl(object):
def __init__(self):
import tkinter
fromtkinter import messagebox
fromtkinter import filedialog
fromtkinter import Tk
fromtkinter import Menu
fromtkinter impor
> On Dec 30, 2017, at 7:46 AM, Peter J. Holzer wrote:
>
> On 2017-12-29 19:09:35 -0500, Dennis Lee Bieber wrote:
>> On Fri, 29 Dec 2017 23:12:22 +, bartc declaimed the
>> following:
>>> Looking at 14 million lines of Linux kernel sources, which are in C,
>>> over 100,000 of them use 'goto'
On Sun, Dec 31, 2017 at 7:36 AM, Ben Bacarisse wrote:
> bartc writes:
>
>> On 30/12/2017 16:53, mm0fmf wrote:
>>> On 30/12/2017 14:41, bartc wrote:
it looks a bit naff
>>>
>>> Understatement of 2017.
>>
>> I'm honest about my own ideas, but my remarks were about the use of
>> special symbols
bartc writes:
> On 30/12/2017 16:53, mm0fmf wrote:
>> On 30/12/2017 14:41, bartc wrote:
>>> it looks a bit naff
>>
>> Understatement of 2017.
>
> I'm honest about my own ideas, but my remarks were about the use of
> special symbols such as "::" and "@".
>
> Before completely dismissing it however
Peter Otten <__pete...@web.de> writes:
> > Let's say I vreated my own CFG in python, How can I […]
>
> Remember, context free grammars may be fine, but context free
> questions aren't ;)
+1 QotW
--
\“The problem with television is that the people must sit and |
`\keep their eyes
Ranya wrote:
> Let's say I vreated my own CFG in python, How can I check now if a
> sentence match this grammar (return true) or it doesn't match it (return
> false and the wrong element in the grammar), How can I do this ?
Remember, context free grammars may be fine, but context free questions
On Sat, Dec 30, 2017 at 8:41 AM, bartc wrote:
> (I had introduced a special language feature just for this kind of thing,
> but it was unsatisfactory. Goto was simpler and understood by everyone. And
> portable to any other language - that hasn't done away with goto. But it
> worked like this (not
On 2017-12-30 18:21, bartc wrote:
On 30/12/2017 16:53, mm0fmf wrote:
On 30/12/2017 14:41, bartc wrote:
it looks a bit naff
Understatement of 2017.
I'm honest about my own ideas, but my remarks were about the use of
special symbols such as "::" and "@".
Before completely dismissing it howev
On 30/12/2017 16:53, mm0fmf wrote:
On 30/12/2017 14:41, bartc wrote:
it looks a bit naff
Understatement of 2017.
I'm honest about my own ideas, but my remarks were about the use of
special symbols such as "::" and "@".
Before completely dismissing it however, you should look at how anothe
On 30/12/2017 14:41, bartc wrote:
it looks a bit naff
Understatement of 2017.
--
https://mail.python.org/mailman/listinfo/python-list
Let's say I vreated my own CFG in python, How can I check now if a sentence
match this grammar (return true) or it doesn't match it (return false and
the wrong element in the grammar), How can I do this ?
--
https://mail.python.org/mailman/listinfo/python-list
On 30/12/2017 03:05, Lawrence D’Oliveiro wrote:
On Saturday, December 30, 2017 at 12:12:23 PM UTC+13, bartc wrote:
Looking at 14 million lines of Linux kernel sources, which are in C,
over 100,000 of them use 'goto'. About one every 120 lines.
That kind of thing leads to spaghetti code.
Here
On 2017-12-29 19:09:35 -0500, Dennis Lee Bieber wrote:
> On Fri, 29 Dec 2017 23:12:22 +, bartc declaimed the
> following:
> >Looking at 14 million lines of Linux kernel sources, which are in C,
> >over 100,000 of them use 'goto'. About one every 120 lines.
> >
>
> C is a language that
31 matches
Mail list logo