On Fri, 03 Jul 2009 15:52:31 +0100, MRAB pyt...@mrabarnett.plus.com
wrote:
Eric S. Johansson wrote:
Horace Blegg wrote:
I've been kinda following this. I have a cousin who is permanently
wheel
chair bound and doesn't have perfect control of her hands, but still
manages to use a computer
You can get giant piano keyboards that you step on, so how about a giant
computer keyboard? I wrote 5 miles of code before lunch! :-)
You can get/make MIDI organ pedal-boards (a friend of mine has two). From
there it's just one small step...
Is that a two-step? a box-step? Count it
I've been kinda following this. I have a cousin who is permanently wheel
chair bound and doesn't have perfect control of her hands, but still manages
to use a computer and interact with society. However, the idea/thought of
disabled programmers was new to me/hadn't ever occurred to me.
You say
Horace Blegg wrote:
I've been kinda following this. I have a cousin who is permanently wheel
chair bound and doesn't have perfect control of her hands, but still
manages to use a computer and interact with society. However, the
idea/thought of disabled programmers was new to me/hadn't ever
Eric S. Johansson wrote:
Horace Blegg wrote:
I've been kinda following this. I have a cousin who is permanently wheel
chair bound and doesn't have perfect control of her hands, but still
manages to use a computer and interact with society. However, the
idea/thought of disabled programmers was
Eric S. Johansson wrote:
Horace Blegg wrote:
I've been kinda following this. I have a cousin who is permanently wheel
chair bound and doesn't have perfect control of her hands, but still
manages to use a computer and interact with society. However, the
idea/thought of disabled programmers was
Steven D'Aprano wrote:
That assumes that every word is all caps. In practice, for real-life
Python code, I've tripled the vocal load of perhaps one percent of your
utterances, which cuts your productivity by 2%.
If you have 1 words in you per day, and one percent get wrapped with
a
Eric S. Johansson wrote:
Steven D'Aprano wrote:
That assumes that every word is all caps. In practice, for real-life
Python code, I've tripled the vocal load of perhaps one percent of your
utterances, which cuts your productivity by 2%.
If you have 1 words in you per day, and one
Eric S. Johansson wrote:
I've been working with speech recognition for 15 years. I've written something
on the order of 10,000 lines of Python code both as open source and private
projects. I've tried it least two dozen editors and they all fail miserably
because they're focused on keyboard
Tim Chase wrote:
I've tried it least two dozen editors and they all fail miserably
because they're focused on keyboard use (but understandable)
[...snip...]
I've tried a whole bunch, like I said at least a dozen. They
all fail for first reasons such as inability to access all
functionality
Rhodri James wrote:
Gah. Ignore me. I hit 'send' instead of 'cancel', after my musings
concluded that yes, an editor could be smart enough, but it would have to
embed a hell of a lot of semantic knowledge of Python and it still wouldn't
eliminate the need to speak the keyboard at times.
On Tue, 30 Jun 2009 03:37:15 +0100, Eric S. Johansson e...@harvee.org
wrote:
Steven D'Aprano wrote:
Why do you think a smart editing environment is in opposition to coding
conventions? Surely an editor smart enough to know a variable name
spoken
as pear tree is an instance and therefore
On Tue, 30 Jun 2009 09:57:27 +0100, Rhodri James
rho...@wildebst.demon.co.uk wrote:
On Tue, 30 Jun 2009 03:37:15 +0100, Eric S. Johansson e...@harvee.org
wrote:
Steven D'Aprano wrote:
Why do you think a smart editing environment is in opposition to coding
conventions? Surely an editor
Eric S. Johansson wrote:
Tim Chase wrote:
It sounds like the issue should be one of making your screen-reader
smarter, not dumbing down Python conventions. I don't know what SR
you're using (Jaws? Window Eyes? yasr? screeder? speakup?
Naturally speaking is speech recognition (speech in
[Trimming for length, sorry if that impacts too much on intelligibility]
On Tue, 30 Jun 2009 02:52:37 +0100, Eric S. Johansson e...@harvee.org
wrote:
let's use an example. Admittedly, this is a very simple example but
hopefully it
illustrates my point
What I dictate is:
from pots is
Eric S. Johansson wrote:
Ethan Furman wrote:
Eric S. Johansson wrote:
yup how long will i[t] be before you become disablesd? maybe not as
badly as I am
but you should start feeling some hand problems in your later 40's to
early 50's
and it goes down hill from there. self
Rhodri James wrote:
[Trimming for length, sorry if that impacts too much on intelligibility]
no problem, one of the hazards of speech recognition uses you become very
verbose.
This goes a long way, but it doesn't eliminate the need for some forms
of escape coming up on a moderately frequent
Tim Chase wrote:
Eric S. Johansson wrote:
np. I get this confusion often.
While I have used SR in some testing, I've found that while it's
passable for prose (and even that, proclamations of 95% accuracy sound
good until you realize how many words comprise 5% of your daily typing
:),
I've tried it least two dozen editors and they all fail
miserably because they're focused on keyboard use (but
understandable)
[...snip...]
I've tried a whole bunch, like I said at least a dozen. They
all fail for first reasons such as inability to access all
functionality through keystrokes
Eric S. Johansson wrote:
I've been working with speech recognition for 15 years. I've written something
on the order of 10,000 lines of Python code both as open source and private
projects. I've tried it least two dozen editors and they all fail miserably
because they're focused on keyboard use
On Mon, 29 Jun 2009 06:07:19 +0100, Eric S. Johansson e...@harvee.org
wrote:
Rhodri James wrote:
Reject away, but I'm afraid you've still got some work to do to
convince me that PEP 8 is more work for an SR system than any other
convention.
[snip sundry examples]
Yes, yes, recognition
Reject away, but I'm afraid you've still got some work to do to
convince me that PEP 8 is more work for an SR system than any other
convention.
Name capname
higher than normal recognition error rate. can require multiple tries
or hand
correction
MultiWordName
Peter Otten wrote:
Eric S. Johansson wrote:
MultiWordName capmulitno-spacecapwordnospacecapname
very high error rate. many retries or hand hurting typing.
Can you define macros in your speech recognition software?
capmulticamelwordcamelname
might slightly lower the error rate.
alex23 wrote:
Eric S. Johansson e...@harvee.org wrote:
no, I know the value if convention when editors can't tell you anything about
the name in question. I would like to see more support for disabled
programmers
like myself and the thousands of programmers injured every year and forced to
Tim Chase wrote:
It sounds like the issue should be one of making your screen-reader
smarter, not dumbing down Python conventions. I don't know what SR
you're using (Jaws? Window Eyes? yasr? screeder? speakup?
Naturally speaking is speech recognition (speech in text out) it is not text
Eric S. Johansson wrote:
yup how long will i[t] be before you become disablesd? maybe not as badly as
I am
but you should start feeling some hand problems in your later 40's to early 50's
and it goes down hill from there. self preservation/interest comes to mind as a
possible motive for
Ethan Furman wrote:
Eric S. Johansson wrote:
yup how long will i[t] be before you become disablesd? maybe not as
badly as I am
but you should start feeling some hand problems in your later 40's to
early 50's
and it goes down hill from there. self preservation/interest comes to
mind as a
On Mon, 29 Jun 2009 20:28:07 +0100, Eric S. Johansson e...@harvee.org
wrote:
Rhodri James wrote:
As far as I can tell, the only thing that you are even vaguely
suggesting
for convention use is underscores_with_everything. As promised, I laugh
hollowly.
I'm sorry. It may have been too
On Mon, 29 Jun 2009 11:49:04 -0400, Eric S. Johansson wrote:
alex23 wrote:
Eric S. Johansson e...@harvee.org wrote:
no, I know the value if convention when editors can't tell you
anything about the name in question. I would like to see more support
for disabled programmers like myself and
Rhodri James wrote:
Could you elucidate a bit? I'm not seeing how you're intending to keep
PEP-8 conventions in this, and I'm not entirely convinced that without
them the smart editor approach doesn't in fact reduce your productivity.
thank you for asking for an elaboration.
Programming
Steven D'Aprano wrote:
Why do you think a smart editing environment is in opposition to coding
conventions? Surely an editor smart enough to know a variable name spoken
as pear tree is an instance and therefore spelled as pear_tree (to use
your own example) would be smart enough to know a
On Mon, 29 Jun 2009 22:37:15 -0400, Eric S. Johansson wrote:
Steven D'Aprano wrote:
...
Sounds to me that your speech environment needs a command to turn
capslock on and off, and your problem with PEP 8 is solved:
you haven't used recognition, have you?
No.
x equals caps on red caps off
Bruno Desthuilliers wrote:
Brendan Miller a écrit :
PEP 8 doesn't mention anything about using all caps to indicate a
constant.
Is all caps meaning don't reassign this var a strong enough
convention to not be considered violating good python style? I see a
lot of people using it, but I also
On Sun, 28 Jun 2009 15:09:21 +0100, Eric S. Johansson e...@harvee.org
wrote:
Bruno Desthuilliers wrote:
Brendan Miller a écrit :
PEP 8 doesn't mention anything about using all caps to indicate a
constant.
Is all caps meaning don't reassign this var a strong enough
convention to not be
On Sun, 28 Jun 2009 10:09:21 -0400, Eric S. Johansson wrote:
Bruno Desthuilliers wrote:
Brendan Miller a écrit :
PEP 8 doesn't mention anything about using all caps to indicate a
constant.
Is all caps meaning don't reassign this var a strong enough
convention to not be considered violating
Rhodri James wrote:
Reject away, but I'm afraid you've still got some work to do to
convince me that PEP 8 is more work for an SR system than any other
convention.
Name capname
higher than normal recognition error rate. can require multiple tries
or hand
correction
MultiWordName
Eric S. Johansson e...@harvee.org wrote:
no, I know the value if convention when editors can't tell you anything about
the name in question. I would like to see more support for disabled
programmers
like myself and the thousands of programmers injured every year and forced to
leave the
Steve Holden wrote:
Gabriel Genellina wrote:
En Tue, 24 Feb 2009 22:52:20 -0200, Ethan Furman et...@stoneleaf.us
escribió:
Steve Holden wrote:
Brian Allen Vanderburg II wrote:
One idea to make constants possible would be to extend properties to be
able to exist at the module level as
Brendan Miller a écrit :
PEP 8 doesn't mention anything about using all caps to indicate a constant.
Is all caps meaning don't reassign this var a strong enough
convention to not be considered violating good python style? I see a
lot of people using it, but I also see a lot of people writing
Ben Finney a écrit :
(snip - about using ALL_CAPS for pseudo-constants)
Perhaps I'd even
argue for an update to PEP 8 that endorses this as conventional.
+1
I've been a bit surprised last time I checked PEP8 to find out this
wasn't already the case - I would have sweared it was.
--
Brian Allen Vanderburg II a écrit :
bock...@virgilio.it wrote:
Constants would be a nice addition in python, sure enough.
But I'm not sure that this can be done without a run-time check every
time
the constant is used, and python is already slow enough. Maybe a check
that is disabled when
Ethan Furman a écrit :
Steve Holden wrote:
Brian Allen Vanderburg II wrote:
(snip)
One idea to make constants possible would be to extend properties to be
able to exist at the module level as well as the class level:
@property
def pi():
return 3.14159.
print(pi) # prints 3.14159
well this sort of awful hackery will allow you to put read only constants on an
existing module
import reportlab
reportlab.__class__
class MyModule(reportlab.__class__):
... @property
... def pi(self):
... return 3
...
z=MyModule('reportlab')
Robin Becker a écrit :
well this sort of awful hackery will allow you to put read only
constants on an existing module
(snip example code)
so I guess if you write your own module class and then use a special
importer you can create module like objects with read only attributes.
Fine
Bruno Desthuilliers wrote:
Robin Becker a écrit :
well this sort of awful hackery will allow you to put read only
constants on an existing module
(snip example code)
so I guess if you write your own module class and then use a special
importer you can create module like objects with read
On Wed, 25 Feb 2009 08:48:27 -, Bruno Desthuilliers
bruno.42.desthuilli...@websiteburo.invalid wrote:
Ben Finney a écrit :
(snip - about using ALL_CAPS for pseudo-constants)
Perhaps I'd even
argue for an update to PEP 8 that endorses this as conventional.
+1
I've been a bit surprised
Ethan Furman wrote:
Steve Holden wrote:
Brian Allen Vanderburg II wrote:
bock...@virgilio.it wrote:
Constants would be a nice addition in python, sure enough.
But I'm not sure that this can be done without a run-time check every
time
the constant is used, and python is already slow
Steve Holden wrote:
Brian Allen Vanderburg II wrote:
bock...@virgilio.it wrote:
Constants would be a nice addition in python, sure enough.
But I'm not sure that this can be done without a run-time check every
time
the constant is used, and python is already slow enough. Maybe a check
that is
En Tue, 24 Feb 2009 22:52:20 -0200, Ethan Furman et...@stoneleaf.us
escribió:
Steve Holden wrote:
Brian Allen Vanderburg II wrote:
One idea to make constants possible would be to extend properties to be
able to exist at the module level as well as the class level:
@property
def pi():
Gabriel Genellina wrote:
En Tue, 24 Feb 2009 22:52:20 -0200, Ethan Furman et...@stoneleaf.us
escribió:
Steve Holden wrote:
Brian Allen Vanderburg II wrote:
One idea to make constants possible would be to extend properties to be
able to exist at the module level as well as the class level:
On Thu, Jan 22, 2009 at 1:16 AM, Aahz a...@pythoncraft.com wrote:
In article mailman.7174.1231915778.3487.python-l...@python.org,
Brendan Miller catph...@catphive.net wrote:
PEP 8 doesn't mention anything about using all caps to indicate a
constant.
Now it does! See
Benjamin Kaplan wrote:
On Thu, Jan 22, 2009 at 1:16 AM, Aahz a...@pythoncraft.com
mailto:a...@pythoncraft.com wrote:
In article mailman.7174.1231915778.3487.python-l...@python.org
mailto:mailman.7174.1231915778.3487.python-l...@python.org,
Brendan Miller catph...@catphive.net
bock...@virgilio.it wrote:
Constants would be a nice addition in python, sure enough.
But I'm not sure that this can be done without a run-time check every time
the constant is used, and python is already slow enough. Maybe a check
that is disabled when running with optimizing flags ?
But I'm
Brian Allen Vanderburg II wrote:
bock...@virgilio.it wrote:
Constants would be a nice addition in python, sure enough.
But I'm not sure that this can be done without a run-time check every
time
the constant is used, and python is already slow enough. Maybe a check
that is disabled when
Benjamin Kaplan benjamin.kaplan at case.edu writes:
On Thu, Jan 22, 2009 at 1:16 AM, Aahz aahz at pythoncraft.com wrote:In
article mailman.7174.1231915778.3487.python-list at python.org,
Brendan Miller catphive at catphive.net wrote:PEP 8 doesn't mention
anything about using all caps to
In article mailman.7174.1231915778.3487.python-l...@python.org,
Brendan Miller catph...@catphive.net wrote:
PEP 8 doesn't mention anything about using all caps to indicate a constant.
Is all caps meaning don't reassign this var a strong enough
convention to not be considered violating good
In article mailman.7174.1231915778.3487.python-l...@python.org,
Brendan Miller catph...@catphive.net wrote:
PEP 8 doesn't mention anything about using all caps to indicate a constant.
Now it does! See
http://www.python.org/dev/peps/pep-0008/
Thanks for bringing this up!
--
Aahz
On Tue, 20 Jan 2009 04:58:30 -, Ben Finney
bignose+hates-s...@benfinney.id.au wrote:
Unless someone's going to argue that “Variable Names” doesn't apply to
constant names, even though Python doesn't make the distinction.
Python doesn't make the distinction, which is precisely why making
Constants would be a nice addition in python, sure enough.
My original question was about PEP-8 and whether it is pythonic to use
all caps to denote a variable that shouldn't be changed. More of a
style question than a language question.
I actually think *enforcing* constantness seems to go
On Mon, 19 Jan 2009 19:11:16 -0800, Brendan Miller wrote:
Constants would be a nice addition in python, sure enough.
My original question was about PEP-8 and whether it is pythonic to use
all caps to denote a variable that shouldn't be changed. More of a style
question than a language
Steven D'Aprano ste...@remove.this.cybersource.com.au writes:
But regardless... yes, it is in my opinion Pythonic to use ALLCAPS
to designate constants (by convention).
I agree, in general. Though I think I can count the number of times
I've wanted to use an ‘UPPER_CASE’-named constant in my
On Wed, 14 Jan 2009 08:13:30 +, Steven D'Aprano wrote:
Absolutely. It's rather sad that I can do this:
import math
math.pi = 3.0
I like the ability to shoot myself in the foot, thank you very much, but
I should at least get a warning when I'm about to do so:
math.PI = 3.0 #
Francesco Bochicchio wrote:
On Wed, 14 Jan 2009 08:13:30 +, Steven D'Aprano wrote:
Absolutely. It's rather sad that I can do this:
import math
math.pi = 3.0
I like the ability to shoot myself in the foot, thank you very much, but
I should at least get a warning when I'm about to do so:
On Tue, 13 Jan 2009 23:26:54 -0800, Brendan Miller wrote:
I tend to use constants as a means of avoiding the proliferation of
magic literals for maintenance reasons... Like say if your example of
FOO would have been used in 10 places. Maybe it is more pythonic to
simply denote such a thing as
On Wed, Jan 14, 2009 at 3:13 AM, Steven D'Aprano
ste...@remove.this.cybersource.com.au wrote:
On Tue, 13 Jan 2009 23:26:54 -0800, Brendan Miller wrote:
I tend to use constants as a means of avoiding the proliferation of
magic literals for maintenance reasons... Like say if your example of
On Wed, 2009-01-14 at 16:58 +1000, James Mills wrote:
[...]
Still I would avoid using this idiom altogether
and jsut stick with default values. For Example:
FOO = 1
def f(x=FOO):
...
Use this instead:
def f(x=1):
...
That only works well when 1 is only used once, and as an
PEP 8 doesn't mention anything about using all caps to indicate a constant.
Is all caps meaning don't reassign this var a strong enough
convention to not be considered violating good python style? I see a
lot of people using it, but I also see a lot of people writing
non-pythonic code... so I
On Wed, Jan 14, 2009 at 4:49 PM, Brendan Miller catph...@catphive.net wrote:
PEP 8 doesn't mention anything about using all caps to indicate a constant.
Is all caps meaning don't reassign this var a strong enough
convention to not be considered violating good python style? I see a
lot of
FOO = 1
def f(x=FOO):
...
Use this instead:
def f(x=1):
...
I tend to use constants as a means of avoiding the proliferation of
magic literals for maintenance reasons... Like say if your example of
FOO would have been used in 10 places. Maybe it is more pythonic to
simply denote
69 matches
Mail list logo