On Sun., 6 Jan. 2019, 13:39 Simon
> I was writing some python code earlier, and I noticed that in a code that
> looks somwhat like this one :
>
> try:
> i = int("string")
> print("continued on")
> j = int(9.0)
> except ValueError as e:
> print(e)
>
> >>> "in
On Sun, Jan 06, 2019 at 01:38:33AM +0100, Simon wrote:
> I propose to be able to use the continue keyword to continue the execution
> of the try block even when an error is handled. The above could then be
> changed to :
>
>
> try:
> i = int("string")
> print("continued on")
On Sat, Jan 5, 2019 at 9:13 PM Moon丶sun wrote:
>
> Thanks for your reply.
> But the answer is not I except, I will show you some examples to explain what
> result I except:
>
> @contextmanager
> def cm():
> print('open file')
> yield
> print('close file')
> with cm():
> 1/0
>
> If
table means. You say "Formatting
> 1.23... * n" (multiplying by n) but the results shown aren't multiplied
> by n=2, n=3, n=4 as the table suggests.
>
> Can you show what Python code you expect will produce the expected
> output?
fo
On 1/5/2019 3:03 PM, Łukasz Stelmach wrote:
Barry Scott writes:
On Friday, 4 January 2019 14:57:53 GMT Łukasz Stelmach wrote:
I would like to present two pull requests[1][2] implementing fixed point
presentation of numbers and ask for comments. The first is mine. I
learnt about the second aft
On 1/5/19 12:21 PM, Mike Miller wrote:>
> On 1/5/19 12:34 AM, Ivan Levkivskyi wrote:
>
> > There is. Mypy supports final names, final methods and whatnot
> > https://mypy.readthedocs.io/en/latest/final_attrs.html
> >
> Believe this^^ is the best answer, unfortunately buried.
The type hinting is
On 1/5/19 7:38 PM, Simon wrote:
>
> I was writing some python code earlier, and I noticed that in a code
> that looks somwhat like this one :
>
> try:
> i = int("string")
> print("continued on")
> j = int(9.0)
> except ValueError as e:
> print(e)
>
> >>> "inv
I was writing some python code earlier, and I noticed that in a code that
looks somwhat like this one :
try:
i = int("string")
print("continued on")
j = int(9.0)
except ValueError as e:
print(e)
>>> "invalid literal for int() with base 10: 'string'"
this c
Barry Scott writes:
> On Friday, 4 January 2019 14:57:53 GMT Łukasz Stelmach wrote:
>>
>> I would like to present two pull requests[1][2] implementing fixed point
>> presentation of numbers and ask for comments. The first is mine. I
>> learnt about the second after publishing mine.
>>
>> The only
On 1/5/19 12:34 AM, Ivan Levkivskyi wrote:
> There is. Mypy supports final names, final methods and whatnot
> https://mypy.readthedocs.io/en/latest/final_attrs.html
Believe this^^ is the best answer, unfortunately buried.
Use typing hints for constants and tools that support them, and all-ca
Steven D'Aprano writes:
> On Fri, Jan 04, 2019 at 03:57:53PM +0100, Łukasz Stelmach wrote:
>> Hi,
>>
>> I would like to present two pull requests[1][2] implementing fixed point
>> presentation of numbers and ask for comments. The first is mine. I
>> learnt about the second after publishing mine.
05.01.19 14:52, Moon丶sun пише:
As we know,when we import the module--'contextlib',we can use the
decorator '@contextmanager' and keyword ‘yield’ to make a 'instance' of
Class '_GeneratorContextManager' in 'contextlib' module,then we can use
it like:
with 'instance' as 'xx':
'code block'
As we know,when we import the module--'contextlib',we can use the decorator
'@contextmanager' and keyword ‘yield’ to make a 'instance' of Class
'_GeneratorContextManager' in 'contextlib' module,then we can use it like:with
'instance' as 'xx':'code block'passBut there is a little bug,when
knowing this mailing list, i think there was not enough reasons for the no
caps case
while waiting for the emoji era, i think it stands good
Abdur-Rahmaan Janhangeer
http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ
Mauritius
___
Python-
On Sat, 5 Jan 2019 at 00:05, Michael Foord wrote:
>
> On Fri, 4 Jan 2019 at 19:02, Abe Dillon wrote:
>>
>> I keep coming back to this great video about coding style, and one point in
>> particular rings true to me: ALL_CAPS_IS_OBNOXIOUS
>
> I really like the convention. It's nice and clear and a
On Friday, 4 January 2019 14:57:53 GMT Łukasz Stelmach wrote:
> Hi,
>
> I would like to present two pull requests[1][2] implementing fixed point
> presentation of numbers and ask for comments. The first is mine. I
> learnt about the second after publishing mine.
>
> The only format using decimal
Dnia January 5, 2019 12:09:44 AM UTC, Abe Dillon
napisał(a):
>> The whole point of the all-caps globals is to tell you a lot about what
>> they are.
>
> A lot? The only thing it canonically tells you is to not modify it
It also tells anyone, who is browsing a code, which values come from a spec
On Sat, 5 Jan 2019 at 02:46, David Mertz wrote:
> Like everyone other than Abe in this thread, I find judicious use of
> CONSTANTS to be highly readable and useful.
>
> Yes, there is a little wiggle room about just how constant a constant has
> to be since Python doesn't have a straightforward wa
18 matches
Mail list logo