Irv Kalb writes:
> I teach intro to programming using Python. […]
Thank you for teaching Python to beginners!
> It seems very odd that Python allows you to override the values of
> True and False.
Yes, it is. That's why Python 3 forbids it::
>>> True = "shadow"
File "", line 1
S
Irv Kalb wrote, on Sunday, January 29, 2017 9:04 PM
>
> I teach intro to programming using Python. In my first
> assignment, students are asked to assign variables of
> different types and print out the values.
>
> One student (who really did not understand Booleans) turned
> in the followi
On Sunday, January 29, 2017 at 4:00:27 PM UTC-6, Gregory Ewing wrote:
> Joseph L. Casale wrote:
> >>.NET is a library that can be used from many languages, including Python.
> >
> > No.
>
> Yes:
>
> http://pythonnet.sourceforge.net/
>
> "Python for .NET is a package that gives Python programmer
It's fixed already in Python 3.
Please use Python 3 when teaching to students.
$ python3
Python 3.6.0 (default, Dec 24 2016, 00:01:50)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> True = "foo"
File
I teach intro to programming using Python. In my first assignment, students
are asked to assign variables of different types and print out the values.
One student (who really did not understand Booleans) turned in the following
for his/her interpretation of Booleans (Python 2.7):
True = 'sha
> What .NET APIs are anticipated to be released that aren't on the
> official CLI list now:
> https://en.wikipedia.org/wiki/List_of_CLI_languages#Current_Languages,
> and/or, are .NET supported languages expected to expand beyond the CLI
> list?
I think this (and the last point) misinterprets the
On Sunday, January 29, 2017 at 10:47:09 PM UTC-8, Chris Angelico wrote:
> On Mon, Jan 30, 2017 at 5:38 PM, wrote:
> > On Sunday, January 29, 2017 at 9:54:44 PM UTC-8, Chris Angelico wrote:
> >> ...
> >> When you close() a generator, it raises GeneratorExit into it, and
> >> then silences any Stop
On Mon, Jan 30, 2017 at 5:38 PM, wrote:
> On Sunday, January 29, 2017 at 9:54:44 PM UTC-8, Chris Angelico wrote:
>> ...
>> When you close() a generator, it raises GeneratorExit into it, and
>> then silences any StopIteration or GeneratorExit that comes out of it.
>
> Chris,
> Thanks for the info.
On Sunday, January 29, 2017 at 9:54:44 PM UTC-8, Chris Angelico wrote:
> ...
> When you close() a generator, it raises GeneratorExit into it, and
> then silences any StopIteration or GeneratorExit that comes out of it.
Chris,
Thanks for the info. Is this (GenExit silencing StopIteration) documente
Hello Guys,
Here i am creating a GUI which will act as a search engine that will find the
results from the browser and save the results as a xls file.
When i typed something in my search box and click the (GO)button.It should
display search in progress.when the file is saved it should display don
inyeol@gmail.com wrote, on January 29, 2017 9:24 PM
>
> Does generator.close() prevent raising StopIteration?
>
> I'm trying to get the return value from coroutine after
> terminating it. Here is simple test code:
>
> $ python3
> Python 3.6.0 (default, Dec 23 2016, 12:50:55)
> [GCC 4.2.1
On Sat, 28 Jan 2017 19:03:42 +1100, Steve D'Aprano wrote:
> shutil.get_terminal_size returns the wrong values when you pipe your output
> to another process, even it you do so in a terminal. Consider this script:
>
>
> import os
> import shutil
> print('shutil:', shutil.get_terminal_size(fallbac
On Mon, Jan 30, 2017 at 4:24 PM, wrote:
> I was expecting StopIteration from c.close() call, but Python 3.6 doesn't
> raise any.
> Is this behavior expected? I couldn't find any reference regarding
> GeneratorExit and StopIteration interaction.
When you close() a generator, it raises Generator
On Monday 30 January 2017 08:12, Serhiy Storchaka wrote:
> On 28.01.17 10:03, Steve D'Aprano wrote:
>> Is shutil.get_terminal_size useless? When, if ever, should I use it in
>> preference to the os version? If the shutil version is broken, can it be
>> fixed?
>
> Read the history of shutil.get_te
Does generator.close() prevent raising StopIteration?
I'm trying to get the return value from coroutine after terminating it.
Here is simple test code:
$ python3
Python 3.6.0 (default, Dec 23 2016, 12:50:55)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.38)] on darwin
Type "help", "copyrig
On 30Jan2017 13:49, Steve D'Aprano wrote:
This code contains a Time Of Check to Time Of Use bug:
if os.path.exists(destination)
raise ValueError('destination already exists')
os.rename(oldname, destination)
In the microsecond between checking for the existence of the destination
On 2017-01-30 03:27, Chris Angelico wrote:
On Mon, Jan 30, 2017 at 1:49 PM, Steve D'Aprano
wrote:
This code contains a Time Of Check to Time Of Use bug:
if os.path.exists(destination)
raise ValueError('destination already exists')
os.rename(oldname, destination)
In the micros
On Mon, Jan 30, 2017 at 1:49 PM, Steve D'Aprano
wrote:
> This code contains a Time Of Check to Time Of Use bug:
>
> if os.path.exists(destination)
> raise ValueError('destination already exists')
> os.rename(oldname, destination)
>
>
> In the microsecond between checking for the ex
On Mon, Jan 30, 2017 at 2:16 AM, Steve D'Aprano
wrote:
> On Mon, 30 Jan 2017 08:12 am, Serhiy Storchaka wrote:
>
>> On 28.01.17 10:03, Steve D'Aprano wrote:
>>> Is shutil.get_terminal_size useless? When, if ever, should I use it in
>>> preference to the os version? If the shutil version is broken,
This code contains a Time Of Check to Time Of Use bug:
if os.path.exists(destination)
raise ValueError('destination already exists')
os.rename(oldname, destination)
In the microsecond between checking for the existence of the destination and
actually doing the rename, it is possi
On Mon, 30 Jan 2017 08:12 am, Serhiy Storchaka wrote:
> On 28.01.17 10:03, Steve D'Aprano wrote:
>> Is shutil.get_terminal_size useless? When, if ever, should I use it in
>> preference to the os version? If the shutil version is broken, can it be
>> fixed?
>
> Read the history of shutil.get_termi
On Mon, 30 Jan 2017 10:52 am, Erik wrote:
> On 29/01/17 14:42, Steve D'Aprano wrote:
>> 1. for...else is misspelled, and should be for...then;
>>
>> 2. Same for while...else;
>
> I don't think I'll ever agree with you on this one.
>
> "then", to me, implies the code following it is always execut
On Sun, 29 Jan 2017 11:42:47 -0800 (PST), Xristos Xristoou wrote:
> i tried to count points from the point shapefile where is within in
> the polygon shapefile but i fail.Maybe my code is complete wrong but i
> tried.
> any idea how to fix my code ?
> i want fast method because i have big data feat
On 29/01/17 14:42, Steve D'Aprano wrote:
1. for...else is misspelled, and should be for...then;
2. Same for while...else;
I don't think I'll ever agree with you on this one.
"then", to me, implies the code following it is always executed.
"else" implies it's conditional.
In those constructs
Joseph L. Casale wrote, on January 29, 2017 1:14 PM
>
> > .NET is a library that can be used from many languages, including
> > Python.
>
> No.
>
> .NET Core (what the OP asked about which is not .NET) is a
> cross-platform framework. Obviously Python and .NET differ in
> runtime semantics wi
Joseph L. Casale wrote:
.NET is a library that can be used from many languages, including Python.
No.
Yes:
http://pythonnet.sourceforge.net/
"Python for .NET is a package that gives Python programmers nearly seamless
integration with the .NET Common Language Runtime (CLR) and provides a po
On Mon, Jan 30, 2017 at 8:54 AM, Gregory Ewing
wrote:
> Steve D'Aprano wrote:
>
>> 5. The statistics module is too slow (and if I ever meet the author, I'll
>> give him a kick in the head);
>
>
> Wow... ad-hominem take to a physical level!
If Steve ever comes face to face with the author of the s
Steve D'Aprano wrote:
5. The statistics module is too slow (and if I ever meet the author, I'll
give him a kick in the head);
Wow... ad-hominem take to a physical level!
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
> .NET is a library that can be used from many languages, including Python.
No.
.NET Core (what the OP asked about which is not .NET) is a cross-platform
framework. Obviously Python and .NET differ in runtime semantics with
respect to the original source code, however they are now roughly equiva
On 28.01.17 10:03, Steve D'Aprano wrote:
Is shutil.get_terminal_size useless? When, if ever, should I use it in
preference to the os version? If the shutil version is broken, can it be
fixed?
Read the history of shutil.get_terminal_size(). All this was discussed.
--
https://mail.python.org/mai
i tried to count points from the point shapefile where is within in the polygon
shapefile but i fail.Maybe my code is complete wrong but i tried.
any idea how to fix my code ?
i want fast method because i have big data features
from shapely.geometry import shape
import fiona
filepath1 = "point.sh
A new version of the Python module which wraps GnuPG has been released.
What Changed?
=
This is an enhancement and bug-fix release, and all users are encouraged to
upgrade.
See the project website [1] for more information.
Brief summary:
* Added support for ``KEY_CONSIDERED`` in mo
I'm looking for a simple Address Book program written in Python, I've
looked at addressbook 1.0.1 from PyPi but it doesn't quite do what I
want. I may have to start with this and modify it but maybe there's
something better out there.
In particular I want some sort of import/export ability and I'
On 2017-01-29, Grant Edwards wrote:
> On 2017-01-29, Marko Rauhamaa wrote:
>
>> Mount? As a regular user?
>
> Yes, using a "fuse" use-space filesystem, you can mount things as a
> normal user. There are a couple ISO9660 fuse implemenations. But, you
> can't modify a mounted ISO9660 filesystem.
Chris Angelico :
> On Mon, Jan 30, 2017 at 3:44 AM, Marko Rauhamaa wrote:
>> Mount? As a regular user?
>
> Let me see, how much effort are you prepared to go to in order to do
> this as a "regular user"... because at some point, "sudo" becomes only
> one of many options, including "install anothe
On Mon, Jan 30, 2017 at 4:08 AM, Grant Edwards
wrote:
> As long as you've got the disk space available, the simplest option is
> to unpack the .iso into a directory, modify the files, and then use
> mkisofs to create the new .iso image.
>
> I've written scripts like that to build cusotmized bootab
On 2017-01-29, Marko Rauhamaa wrote:
> Mount? As a regular user?
Yes, using a "fuse" use-space filesystem, you can mount things as a
normal user. There are a couple ISO9660 fuse implemenations. But, you
can't modify a mounted ISO9660 filesystem. I have read about how to
use a union mount to si
On 2017-01-29, Marko Rauhamaa wrote:
> Chris Angelico :
>
>> On Mon, Jan 30, 2017 at 3:28 AM, Marko Rauhamaa wrote:
>>> Grant Edwards :
>>>
On 2017-01-29, Marko Rauhamaa wrote:
> I *have* been longing for a serial console in linux distros.
Well, all it takes is a tweak to the
On Mon, Jan 30, 2017 at 3:44 AM, Marko Rauhamaa wrote:
> Chris Angelico :
>
>> On Mon, Jan 30, 2017 at 3:28 AM, Marko Rauhamaa wrote:
>>> Grant Edwards :
>>>
On 2017-01-29, Marko Rauhamaa wrote:
> I *have* been longing for a serial console in linux distros.
Well, all it takes
Chris Angelico :
> On Mon, Jan 30, 2017 at 3:28 AM, Marko Rauhamaa wrote:
>> Grant Edwards :
>>
>>> On 2017-01-29, Marko Rauhamaa wrote:
I *have* been longing for a serial console in linux distros.
>>>
>>> Well, all it takes is a tweak to the bootloader to add a kernel
>>> "command-line" pa
On Mon, Jan 30, 2017 at 3:28 AM, Marko Rauhamaa wrote:
> Grant Edwards :
>
>> On 2017-01-29, Marko Rauhamaa wrote:
>>> I *have* been longing for a serial console in linux distros.
>>
>> Well, all it takes is a tweak to the bootloader to add a kernel
>> "command-line" parameter...
>
> Can you give
Grant Edwards :
> On 2017-01-29, Marko Rauhamaa wrote:
>> I *have* been longing for a serial console in linux distros.
>
> Well, all it takes is a tweak to the bootloader to add a kernel
> "command-line" parameter...
Can you give me a short Python script that effects the tweak to an ISO
image? I
On 2017-01-29, Marko Rauhamaa wrote:
> Grant Edwards :
>
>> On 2017-01-28, Marko Rauhamaa wrote:
>>
>>> (Although if I were to design an operating system, I don't know if I
>>> would bother with controlling terminals, job control or chirping
>>> modems.)
>>
>> I've been using serial ports on Unix
On Mon, 30 Jan 2017 12:05 am, BartC wrote:
> What might be unreasonable is to criticise it in a Python group full
> of language aficionados who are going to view every feature and quirk of
> the language in a good light;
It's all about the trade-offs we choose to make. Its not that we don't
unde
On Mon, Jan 30, 2017 at 12:05 AM, BartC wrote:
> On 29/01/2017 01:35, pavlovevide...@gmail.com wrote:
>>
>> On Monday, January 23, 2017 at 9:24:56 AM UTC-8, bream...@gmail.com wrote:
>>>
>>> The article is here http://lenkaspace.net/index.php/blog/show/111
>>>
>>> Kindest regards.
>>>
>>> Mark Law
On 29/01/2017 01:35, pavlovevide...@gmail.com wrote:
On Monday, January 23, 2017 at 9:24:56 AM UTC-8, bream...@gmail.com wrote:
The article is here http://lenkaspace.net/index.php/blog/show/111
Kindest regards.
Mark Lawrence.
I remember the old days of Python when it was just Perl's little b
>
> As you guys might know, .NET Core is up and running, promising a
> "cross-platform, unified, fast, lightweight, modern and open source
> experience" (source: .NET Core official site). What do you guys think about
> it? Do you think it will be able to compete with and overcome Python in the
> op
Grant Edwards :
> On 2017-01-28, Marko Rauhamaa wrote:
>
>> (Although if I were to design an operating system, I don't know if I
>> would bother with controlling terminals, job control or chirping
>> modems.)
>
> I've been using serial ports on Unix for 35 years, and maintaining
> serial drivers
Juan C. wrote, on Saturday, January 28, 2017 7:07 PM
>
> As you guys might know, .NET Core is up and running,
> promising a "cross-platform, unified, fast, lightweight,
> modern and open source experience" (source: .NET Core
> official site). What do you guys think about it? Do you think
> it
49 matches
Mail list logo