On Sat, 19 Apr 2008 12:18:47 +1200
Greg Ewing <[EMAIL PROTECTED]> wrote:
> Antoine Pitrou wrote:
>
> > Why do you want to derive program bugs from EnvironmentError ? Usually I
> > derive
> > them from ValueError, RuntimeError or simply Exception.
>
> I'm *not* talking about program bugs, I'm ta
Michael Foord wrote:
> It seems to be more common in the 'Python world' to refer to indexing
> than subscription
Especially since the subscript isn't actually written
as a subscript, unless you have a particulary fancy
code editor...
--
Greg
___
Pytho
Antoine Pitrou wrote:
> Why do you want to derive program bugs from EnvironmentError ? Usually I
> derive
> them from ValueError, RuntimeError or simply Exception.
I'm *not* talking about program bugs, I'm talking about
exceptions due to something the user did wrong.
I like to be able to do thi
> I tend to agree with Benjamin that "unsubscriptable" is a made-up word,
> but so is "unindexable". So, whatever.
FWIW, here is what other tools give as error message in similar cases:
gcc: subscripted value is neither array nor pointer
g++: invalid types ‘double[int]’ for array subscript
javac
Scott Dial wrote:
> Benjamin Peterson wrote:
>
>> Consider this error:
>>
> 3["something"]
>
>> Traceback (most recent call last):
>> File "", line 1, in
>> TypeError: 'int' object is unsubscriptable
>>
>> "unscriptable" seems rather ambiguous. How about "[object] cann
Benjamin Peterson wrote:
> Consider this error:
3["something"]
> Traceback (most recent call last):
> File "", line 1, in
> TypeError: 'int' object is unsubscriptable
>
> "unscriptable" seems rather ambiguous. How about "[object] cannot be indexed"?
>
Although I think this is a bit of bi
On Fri, Apr 18, 2008 at 5:43 PM, Benjamin Peterson
<[EMAIL PROTECTED]> wrote:
> Consider this error:
> >>> 3["something"]
> Traceback (most recent call last):
> File "", line 1, in
> TypeError: 'int' object is unsubscriptable
>
> "unscriptable" seems rather ambiguous. How about "[object] can
Consider this error:
>>> 3["something"]
Traceback (most recent call last):
File "", line 1, in
TypeError: 'int' object is unsubscriptable
"unscriptable" seems rather ambiguous. How about "[object] cannot be indexed"?
--
Cheers,
Benjamin Peterson
___
On Fri, Apr 18, 2008 at 7:38 AM, Christian Heimes <[EMAIL PROTECTED]> wrote:
> Benjamin Peterson schrieb:
>
>
>
> In Python we usually have to methods for the job, like
> set_py3kwarningmode and get_py3kwarningmode. I don't like the enable*
> and disable* style. Even the get/set methods are an u
Michael Foord wrote:
> that the 'assert' statement should be used
> instead of 'assert_'.
assert statements are actually a bad idea in tests - they get skipped
when the test suite is run with optimisation switched on.
Cheers,
Nick.
--
Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Austr
ACTIVITY SUMMARY (04/11/08 - 04/18/08)
Tracker at http://bugs.python.org/
To view or respond to any of the issues listed below, click on the issue
number. Do NOT respond to this message.
1839 open (+31) / 12641 closed ( +7) / 14480 total (+38)
Open issues with patches: 550
Average durati
On Fri, Apr 18, 2008 at 8:27 AM, Jeroen Ruigrok van der Werven
<[EMAIL PROTECTED]> wrote:
> # vim: set fileencoding=utf-8 :
>
> kanamap = {
> u'あ': 'a'
> }
>
> def transpose(word):
> """Convert a word in kana to its equivalent Hepburn romanisation.
>
> >>> transpose(u'あ')
> 'a'
>
Hello,
Antony Joseph wrote:
> Hi,
>
> My Code:
> mapi.MAPIInitialize(None)
> session = mapi.MAPILogonEx(0, MAPIProfile, None,
> mapi.MAPI_EXTENDED | mapi.MAPI_USE_DEFAULT)
>
> I am trying to send a mail using the extended MAPI interface, I am
> new to work with MA
# vim: set fileencoding=utf-8 :
kanamap = {
u'あ': 'a'
}
def transpose(word):
"""Convert a word in kana to its equivalent Hepburn romanisation.
>>> transpose(u'あ')
'a'
"""
transposed = ''
for character in word:
transposed += kanamap[character]
return tr
Can you provide an example that fails? This seems to work on my end, for
instance:
>>> mydict = { u'\u2026' : 'ellipsis' }
>>> mydict[u'\u2026']
'ellipsis'
- Atul
On Fri, Apr 18, 2008 at 7:12 AM, Jeroen Ruigrok van der Werven <
[EMAIL PROTECTED]> wrote:
> Is it a known doctest bug that w
Is it a known doctest bug that when you have a dict with Unicode key values
that doctest dies with a KeyError?
When I excute my code from the regular python interpreter it works as
expected.
--
Jeroen Ruigrok van der Werven / asmodai
イェルーン ラウフロック ヴァン デル ウェルヴェン
http://www.in-nomine.org/ | http:/
Hi,
My Code:
mapi.MAPIInitialize(None)
session = mapi.MAPILogonEx(0, MAPIProfile, None,
mapi.MAPI_EXTENDED | mapi.MAPI_USE_DEFAULT)
I am trying to send a mail using the extended MAPI interface, I am
new to work with MAPI.
I am trying to execute your code,i getting
Benjamin Peterson schrieb:
> I currently have a patch to make it possible to change py3k warnings
> in Python through new functions in sys: issue 2458. I realize the
> functions are rather ugly, but I don't think there is another
> practical way to do it unless you want to be writing PySys_GetObjec
Greg Ewing canterbury.ac.nz> writes:
>
> Really? Nobody else wants a convenient way to
> distinguish program bugs from exceptions caused
> by external factors?
Why do you want to derive program bugs from EnvironmentError ? Usually I derive
them from ValueError, RuntimeError or simply Exception.
19 matches
Mail list logo