On 03/11/2019 01:00 PM, Abdur-Rahmaan Janhangeer wrote:
> the problem was that i was reviewing the code, since everything worked (no
> errors but wrong output for sure) it took sometimes to find that var. it
> was like someone telling me there is fish in that lake and i was throwing
> my line tryin
[[Replacing snipped context:]]
> = Abdur-Rahmaan, no indent is me.
On 12/03/2019 11:32, Abdur-Rahmaan Janhangeer wrote:
> no i mean
>
> # *-* use strict *-*
Ugh.
> program
> typovar = x # line y
>
> ...
>
>
> Traceback:
> on the fly var at
On 12/03/2019 11:41, Abdur-Rahmaan Janhangeer wrote:
i also proposed
# -*- explicit -*-
To expand on my previous "ugh", I don't like hiding major run-time
changes in cryptic comments. Behaviour like this should be very
explicit in the way that a comment isn't, and shouldn't be so easily the
ok, writing a pep-like document to explain all at once. sorry for
eyes-hurting and brain-hunting.
Abdur-Rahmaan Janhangeer
http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ
Mauritius
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, Mar 12, 2019 at 11:18 PM Abdur-Rahmaan Janhangeer
wrote:
>
> excuses.
>
> have you used Js? well a bit like that in py.
Yes, I have used JS, and in fact it's a critical part of my day job.
But JS has a big difference in that you *declare* variables. As Rhodri
says, asking for mandatory va
excuses.
have you used Js? well a bit like that in py.
not necessarily unused as currently as it is, you can use the real one many
times, the typo one many times. it's not an error but it's not what you
expect. a linter basically parses the text, proposing to catch that without
linter.
the root
On Tue, Mar 12, 2019 at 11:02 PM Abdur-Rahmaan Janhangeer
wrote:
>
> by keeping a list /a record of those variables beforehand and knowing that no
> new assignments in loops or such blocks of code.
>
Please, quote posts with proper context. Your posts are all
context-free, which is great for a g
by keeping a list /a record of those variables beforehand and knowing that
no new assignments in loops or such blocks of code.
Abdur-Rahmaan Janhangeer
http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ
Mauritius
--
https://mail.python.org/mailman/listinfo/python-list
by some special symbols before the variable name
like
_that
some code:
_tht
^
Traceback:
...
Abdur-Rahmaan Janhangeer
http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ
Mauritius
--
https://mail.python.org/mailman/listinfo/python-list
On Tue, Mar 12, 2019 at 10:58 PM Abdur-Rahmaan Janhangeer
wrote:
>
> by some special symbols before the variable name
>
> like
>
> _that
>
> some code:
> _tht
>
I don't understand. How is Python to know that "_that" is correct but
"_tht" is not?
ChrisA
--
https://mail.python.org/mailman/li
On Tue, Mar 12, 2019 at 10:43 PM Abdur-Rahmaan Janhangeer
wrote:
>
> no just the var you want to track maybe
>
> _var
>
> or something like that, i want to solve that problem and this is just a
> proposal
>
How do you specify which variables should be tracked? What defines
this? Be completely cle
i also proposed
# -*- explicit -*-
above
Abdur-Rahmaan Janhangeer
http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ
Mauritius
--
https://mail.python.org/mailman/listinfo/python-list
no just the var you want to track maybe
_var
or something like that, i want to solve that problem and this is just a
proposal
Abdur-Rahmaan Janhangeer
http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ
Mauritius
--
https://mail.python.org/mailman/listinfo/python-list
On 12/03/2019 11:32, Abdur-Rahmaan Janhangeer wrote:
no i mean
# *-* use strict *-*
Ugh.
program
typovar = x # line y
...
Traceback:
on the fly var at line y
Yes, but how is the program supposed to know that typovar is a typo?
Are you proposing mandatory declarations for
no i mean
# *-* use strict *-*
program
typovar = x # line y
...
Traceback:
on the fly var at line y
Abdur-Rahmaan Janhangeer
http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ
Mauritius
--
https://mail.python.org/mailman/listinfo/python-list
On 11/03/2019 19:08, Abdur-Rahmaan Janhangeer wrote:
proposing a special python syntax for it, like if flag set, it halts
execution. not relying on external tools like linters.
Do you mean on the command line, like "python --lint-me-baby myprog.py"?
I could live with that, though I'd hate to
great post, i understand what you are saying. the smaller pieces was
interesting. but poor me, i should have posted this to python-ideas
Abdur-Rahmaan Janhangeer
http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ
Mauritius
--
https://mail.python.org/mailman/listinfo/python-list
On 12/03/19 8:00 AM, Abdur-Rahmaan Janhangeer wrote:
about the editor part i think yes it'd underline unused variables or
somewhat similar.
is that the best we can hope for (coupled with type annotations)?
the problem was that i was reviewing the code, since everything worked (no
errors but
proposing a special python syntax for it, like if flag set, it halts
execution. not relying on external tools like linters.
--
https://mail.python.org/mailman/listinfo/python-list
On 11/03/2019 18:24, Abdur-Rahmaan Janhangeer wrote:
i mean a way to solve the problem of declaring variables beforehand and not
changing in loop. like not using undeclated variables. but that's precisely
what python has, you can't just declare a variable with no assignment.
maybe some special
missed reply all
-- Forwarded message -
From: Abdur-Rahmaan Janhangeer
Date: Mon, 11 Mar 2019, 22:59
Subject: Re: "use strict"
To: DL Neil
about the editor part i think yes it'd underline unused variables or
somewhat similar.
the problem was that i was rev
Abdur-Rahmaan, with greetings,
On 12/03/19 6:45 AM, Abdur-Rahmaan Janhangeer wrote:
Greetings,
would it be a good idea to add a use strict in py like js?
recently i was helping someone and that was one annoying part where a typo
in a var name caused an unintended variable to slip in.
maybe
On 11/03/2019 17:45, Abdur-Rahmaan Janhangeer wrote:
Greetings,
would it be a good idea to add a use strict in py like js?
recently i was helping someone and that was one annoying part where a typo
in a var name caused an unintended variable to slip in.
maybe something like that
# -*- strict
Greetings,
would it be a good idea to add a use strict in py like js?
recently i was helping someone and that was one annoying part where a typo
in a var name caused an unintended variable to slip in.
maybe something like that
# -*- strict -*-
# -*- explicit -*-
could be used to prevent it
24 matches
Mail list logo