I would like to present you with a performance test where Python performs very well in relation to the NHI1 project regarding
the integration of Python into C.
-> results:
http://thedev.nhi1.de/theLink/main/md_docs_2main_2README__PERFORMANCE.htm#README_PERFORMANCE
-> project: http://thedev
On 5/30/20 1:42 AM, Preetha M wrote:
> Hello. Thank you for responding to my previous mail. Can someone tell me
> how to connect python to sublime text 3. Whenever I select python and type
> the code, it does not work when I press ctrl+B. Please tell.
>
Try Corey Schaefer's video on setup:
(sear
On 30/05/20 7:42 PM, Preetha M wrote:
Hello. Thank you for responding to my previous mail. Can someone tell me
how to connect python to sublime text 3. Whenever I select python and type
the code, it does not work when I press ctrl+B. Please tell.
ST is an editor/IDE which is not Python-specifi
Hello. Thank you for responding to my previous mail. Can someone tell me
how to connect python to sublime text 3. Whenever I select python and type
the code, it does not work when I press ctrl+B. Please tell.
--
https://mail.python.org/mailman/listinfo/python-list
legau...@gmail.com wrote:
> os.system("... {input_pdf} ...".format(..., input_pdf=input_pdf))
> I see it does not like spaces in the file name
Use subprocess.call(), not os.system(), then:
>>> filename = "hello world.txt"
>>> with open(filename, "w") as f: print("Hello, world!", file=f)
...
>>
I see it does not like spaces in the file name
-Original Message-
From: legau...@gmail.com
Sent: Friday, February 14, 2020 7:55 AM
To: 'Bheesham Persaud' ; python-list@python.org
Subject: RE: ghostscripts in python with watchdog
I'm not sure what happens, when I'm
ython-list On
Behalf Of Bheesham Persaud
Sent: Friday, February 14, 2020 1:26 AM
To: python-list@python.org
Subject: Re: ghostscripts in python with watchdog
Hey!
If you change the "-sOutputFile` parameter you pass into gswin64c.
For example, something like:
output_directory
Hey!
If you change the "-sOutputFile` parameter you pass into gswin64c.
For example, something like:
output_directory = os.path.join(os.path.dirname(input_src), "out")
And then you should be able to modify the call to `os.system` to
something like:
os.system(
"gswin64c -q -d
I'm trying to use ghostscripts with python watchdog.
I want to duplicate the last page of a pdf to another directory using the
same name as the source pdf + page number.
So watchdog will monitor the directory for the pdf and ghostscript will copy
the last page to another directory.
I have this,
ko palypse
Envoyé : lundi 23 septembre 2019 13:44
À : python-list@python.org
Objet : Re: Unable to start Python with Windows 7
>What is strange is that I can run Python, but only with a short program !
Hi Crhistian,
hard to tell, what might help is if you can copy/paste code which does
not run (an e
>What is strange is that I can run Python, but only with a short program !
Hi Crhistian,
hard to tell, what might help is if you can copy/paste code which does
not run (an example should be as small as possible).
In addition, isn't there any output you get when the program doesn't run?
A traceback
nvoyé : jeudi 19 septembre 2019 18:06
À : python-list@python.org
Objet : Re: Unable to start Python with Windows 7
Am Donnerstag, 19. September 2019 17:52:48 UTC+2 schrieb cdoa...@orange.com:
> Hi,
> I am no more able to start Python from Windows 7 environment.
> I have the following me
Am Donnerstag, 19. September 2019 17:52:48 UTC+2 schrieb cdoa...@orange.com:
> Hi,
> I am no more able to start Python from Windows 7 environment.
> I have the following message :
> "The Application was unable to start correctly, (0xC142). Click OK to
> close the application"
>
> Do you have
Hi,
I am no more able to start Python from Windows 7 environment.
I have the following message :
"The Application was unable to start correctly, (0xC142). Click OK to close
the application"
Do you have any idea where the problem is ?
Bests regards,
___
Christian Doa
On Wed, 04 Jul 2018 23:25:14 +, Adrian Taylor wrote:
> G'day All,
>
> I have just discovered Python and thanks to a script by Ethan I can read
> a foxpro database and change the required values.
> However my next big step is to be able to use this python feature within
> a website.
>
> Basic
Adrian Taylor writes:
> I have just discovered Python […]
Welcome. The Python community has a starter page for beginners at
https://wiki.python.org/moin/BeginnersGuide>.
> However my next big step is to be able to use this python feature
> within a website.
Good. Be aware, though, that running
G'day All,
I have just discovered Python and thanks to a script by Ethan I can read a
foxpro database and change the required values.
However my next big step is to be able to use this python feature within a
website.
Basically I want to be able to click on a button and call the script.
This wo
Sorry, it was a glitch on the template when moved to another folder (just
fixed).
On Mon, Feb 19, 2018 at 10:08 AM, ElChino wrote:
> Fabio Zadrozny wrote:
>
> See: http://www.pydev.org/vscode/ for more information!
>>
>
> That page includes so many dead links that it looks
> like a joke.
> --
>
Fabio Zadrozny wrote:
See: http://www.pydev.org/vscode/ for more information!
That page includes so many dead links that it looks
like a joke.
--
https://mail.python.org/mailman/listinfo/python-list
Hi All,
I'm happy to announce that PyDev (http://www.pydev.org) can now be used for
Python development on Visual Studio Code!
The first release already provides features such as code analysis, code
completion, go to definition, symbols for the workspace and editor, code
formatting, find reference
nospam.jaya.bir...@gmail.com (jaya birdar) writes:
> Please let me know anyone aware about the issue
Please let us know about the issue.
* What Python is this? Installed how? Running on what platform?
* What code base is this? What is a simple complete, executable example
http://www.sscce.org
On 11/27/17 8:13 AM, jaya.bir...@gmail.com wrote:
> Please let me know anyone aware about the issue
>
>
> Traceback (most recent call last):
> File "testrunner.py", line 447, in
> testrunner_obj.main()
> File "testrunner.py", line 433, in main
> self.result()
> File "testrunner.py", line 310, in r
Please let me know anyone aware about the issue
Traceback (most recent call last):
File "testrunner.py", line 447, in testrunner_obj.main()
File "testrunner.py", line 433, in main self.result()
File "testrunner.py", line 310, in result result = runner.run(self.suite)
File "/auto/PyUnit/PyUnit-0.
On 11/27/17 8:13 AM, jaya.bir...@gmail.com wrote:
Please let me know anyone aware about the issue
Traceback (most recent call last):
File "testrunner.py", line 447, in
testrunner_obj.main()
File "testrunner.py", line 433, in main
self.result()
File "testrunner.py", line 310, in result
result =
Please let me know anyone aware about the issue
Traceback (most recent call last):
File "testrunner.py", line 447, in
testrunner_obj.main()
File "testrunner.py", line 433, in main
self.result()
File "testrunner.py", line 310, in result
result = runner.run(self.suite)
File "/auto/PyUnit/PyUnit-0.
On Sat, Apr 22, 2017 at 5:05 AM, Steve D'Aprano
wrote:
> https://blogs.technet.microsoft.com/dataplatforminsider/2017/04/
> 19/python-in-sql-server-2017-enhanced-in-database-machine-learning/
>
> Quote:
>
> We are excited to share the preview release of in-database analytics and
> machine learnin
https://blogs.technet.microsoft.com/dataplatforminsider/2017/04/19/python-in-sql-server-2017-enhanced-in-database-machine-learning/
Quote:
We are excited to share the preview release of in-database analytics and
machine learning with Python in SQL Server. Python is one of the most
popular languag
Thanks for your help.
>
> >
> > I am working on embedding Python in my application.
>
> You forgot to tell us the version of Python that you're embedding.
>
> I am using Python2.7.
> > I have redirected sys.stdin and sys.stdout to call methods from a Qt
> TextEdit
> > widget. Everything works fi
On Fri, Jan 6, 2017 at 1:06 AM, H Krishnan wrote:
> I tried replacing sys.displayhook with a function that does not print
> newline but the newline still got inserted. So, I am not sure where the
> newline is coming from. In any case, I could override sys.displayhook to add
> a newline at the end
Hello Mr.Eryk,
Thanks for the detailed explanation. After I added attribute support to my
extension class for stdio, the problem was resolved.
Regards,
Krishnan
On Fri, Jan 6, 2017 at 9:24 AM, eryk sun wrote:
> On Fri, Jan 6, 2017 at 1:06 AM, H Krishnan wrote:
> > I tried replacing sys.disp
On Thu, Jan 5, 2017 at 7:09 AM, H Krishnan wrote:
>
> I am working on embedding Python in my application.
You forgot to tell us the version of Python that you're embedding.
> I have redirected sys.stdin and sys.stdout to call methods from a Qt TextEdit
> widget. Everything works fine except that
Hello Mr.Eryk,
Thanks for the detailed explanation. After I added attribute support to my
extension class for stdio, the problem was resolved.
Regards,
Krishnan
On Fri, Jan 6, 2017 at 9:24 AM, eryk sun wrote:
> On Fri, Jan 6, 2017 at 1:06 AM, H Krishnan wrote:
> > I tried replacing sys.displ
On Fri, Jan 6, 2017 at 1:06 AM, H Krishnan wrote:
> I tried replacing sys.displayhook with a function that does not print
> newline but the newline still got inserted. So, I am not sure where the
> newline is coming from. In any case, I could override sys.displayhook to add
> a newline at the end
Thanks for your help.
>
> >
> > I am working on embedding Python in my application.
>
> You forgot to tell us the version of Python that you're embedding.
>
> I am using Python2.7.
> > I have redirected sys.stdin and sys.stdout to call methods from a Qt
> TextEdit
> > widget. Everything works fi
On Thu, Jan 5, 2017 at 7:09 AM, H Krishnan wrote:
>
> I am working on embedding Python in my application.
You forgot to tell us the version of Python that you're embedding.
> I have redirected sys.stdin and sys.stdout to call methods from a Qt TextEdit
> widget. Everything works fine except that
Hi,
I am working on embedding Python in my application. I have redirected
sys.stdin and sys.stdout to call methods from a Qt TextEdit widget.
Everything works fine except that the Python prompt does not always come in
a new line:
>>> dir()
['__builtins__', '__doc__', '__name__', '__package__']>>>
On 2016-12-02, Marko Rauhamaa wrote:
> Grant Edwards :
>> In general CISC processors like x86, AMD64, 68K have read-modify-write
>> instructions that allow you to increment a memory location or
>> set/clear a bit in memory with a single instruction:
>>
>> INC.W [R0]# increment memory word
Grant Edwards :
> In general CISC processors like x86, AMD64, 68K have read-modify-write
> instructions that allow you to increment a memory location or
> set/clear a bit in memory with a single instruction:
>
> INC.W [R0]# increment memory word whose addr is in register R0
The x86 instru
On 12/01/2016 08:39 PM, Ned Batchelder wrote:
> On Thursday, December 1, 2016 at 7:26:18 PM UTC-5, DFS wrote:
>> How is it possible that the 'if' portion runs, then 44/100,000ths of a
>> second later my process yields to another process which deletes the
>> file, then my process continues.
>
> A
On 2016-12-02, Steve D'Aprano wrote:
> I'm not an expert on the low-level hardware details, so I welcome
> correction, but I think that you can probably expect that the OS can
> interrupt code execution between any two CPU instructions.
Yep, mostly. Some CPUs have "lock" features that allow two
On Fri, 2 Dec 2016 11:26 am, DFS wrote:
>> For most programs, yes, it probably will never be a problem to check
>> for existence, and then assume that the file still exists. But put that
>> code on a server, and run it a couple of million times, with dozens of
>> other processes also manipulating
On Fri, 2 Dec 2016 11:26 am, DFS wrote:
> On 12/01/2016 06:48 PM, Ned Batchelder wrote:
>> On Thursday, December 1, 2016 at 2:31:11 PM UTC-5, DFS wrote:
>>> After a simple test below, I submit that the above scenario would never
>>> occur. Ever. The time gap between checking for the file's exist
On Thursday, December 1, 2016 at 7:26:18 PM UTC-5, DFS wrote:
> On 12/01/2016 06:48 PM, Ned Batchelder wrote:
> > On Thursday, December 1, 2016 at 2:31:11 PM UTC-5, DFS wrote:
> >> After a simple test below, I submit that the above scenario would never
> >> occur. Ever. The time gap between check
On Thursday, December 1, 2016 at 2:31:11 PM UTC-5, DFS wrote:
> After a simple test below, I submit that the above scenario would never
> occur. Ever. The time gap between checking for the file's existence
> and then trying to open it is far too short for another process to sneak
> in and dele
On Wed, 30 Nov 2016 05:35 pm, DFS wrote:
> On 11/29/2016 10:20 PM, Steven D'Aprano wrote:
>> On Wednesday 30 November 2016 10:59, woo...@gmail.com wrote:
>>
>>> If you want to do something only if the file exists (or does not), use
>>> os.path.isfile(filename)
>>
>> No, don't do that. Just because
Marko Rauhamaa :
> Peter Otten <__pete...@web.de>:
>
>> Marko Rauhamaa wrote:
>>>try:
>>>f = open("xyz")
>>>except FileNotFoundError:
>>>...[B]...
>>>try:
>>>...[A]...
>>>finally:
>>>f.close()
>>
>> What's the problem with spelling the above
>>
>> tr
On Wednesday 30 November 2016 10:59, woo...@gmail.com wrote:
> If you want to do something only if the file exists (or does not), use
> os.path.isfile(filename)
No, don't do that. Just because the file exists, doesn't mean that you have
permission to read or write to it.
Worse, the code is vuln
On Tue, 29 Nov 2016 at 23:59 wrote:
> If you want to do something only if the file exists (or does not), use
> os.path.isfile(filename)
>
This opens you up to a potential race condition (and has potential security
implications, depending on the application), as you're using LBYL[0].
If you want
If you want to do something only if the file exists (or does not), use
os.path.isfile(filename)
--
https://mail.python.org/mailman/listinfo/python-list
Peter Otten <__pete...@web.de>:
> Marko Rauhamaa wrote:
>
>> However, I think the real answer is that you shouldn't mix the "with"
>> construct with exception handling. Instead you should write:
>>
>>try:
>>f = open("xyz")
>>except FileNotFoundError:
>>...[B]...
>>try:
Marko Rauhamaa wrote:
> However, I think the real answer is that you shouldn't mix the "with"
> construct with exception handling. Instead you should write:
>
>try:
>f = open("xyz")
>except FileNotFoundError:
>...[B]...
>try:
>...[A]...
>finally:
>f
Steven D'Aprano :
> There is no need to catch the exception if you're not going to do
> anything with it.
Correct. However, the question of the subject line is still a good one.
See:
try:
with open("xyz") as f:
...[A]...
except FileNotFoundError:
...[B]...
The
Thanks Steve I got what you were trying to explain , nice learning from
this conversation , what I was really doing wrong I had broken down my huge
code into a simple program and had missed out returning False.
On Tue, Nov 29, 2016 at 11:01 AM, Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.
On Tuesday 29 November 2016 02:18, Ganesh Pal wrote:
> On Mon, Nov 28, 2016 at 1:16 PM, Steven D'Aprano <
> steve+comp.lang.pyt...@pearwood.info> wrote:
>
>>
>>
>> There is no need to return True. The function either succeeds, or it
>> raises an
>> exception, so there is no need to return any val
Dear Python friends,
Any suggestion on how to add exception and make the below program look
better , I am using Python 2.7 and Linux
def create_files_append():
""" """
try:
os.makedirs
Ganesh Pal wrote:
> I am using Python 2.7 and Linux
As a rule of thumb¹, use at least Python 3.3 for new programs.
> What will be the best way to catch the exception in the above program ?
> Can we replace both the with statement in the above program with
> something like below
>
> try:
>
On 11/28/2016 08:18 AM, Ganesh Pal wrote:
> On Mon, Nov 28, 2016 at 1:16 PM, Steven D'Aprano <
> steve+comp.lang.pyt...@pearwood.info> wrote:
>
>>
>>
>> There is no need to return True. The function either succeeds, or it
>> raises an
>> exception, so there is no need to return any value at all.
>
On Mon, Nov 28, 2016 at 1:16 PM, Steven D'Aprano <
steve+comp.lang.pyt...@pearwood.info> wrote:
>
>
> There is no need to return True. The function either succeeds, or it
> raises an
> exception, so there is no need to return any value at all.
>
>
I returned True here ,because based on the result
On Monday 28 November 2016 17:09, Ganesh Pal wrote:
> Dear Python friends,
>
> Any suggestion on how to add exception and make the below program look
> better , I am using Python 2.7 and Linux
>
>
>
>
Dear Python friends,
Any suggestion on how to add exception and make the below program look
better , I am using Python 2.7 and Linux
def create_files_append():
""" """
try:
os.makedir
Hi Vinicius,
On Thursday 05 May 2016 04:16, Vinicius wrote:
> To add a point, you do:
> From geomath import point
> A = point.Point(x,y)
> A.distance(PointB)
> A.mispoint(PointB)
> A.quadrant()
How does your library compare with Eukleides?
http://www.eukleides.org/quickstart.html
--
Steve
On 05/04/2016 01:48 AM, Vinicius Mesel wrote:
f you want to check it out, here is the link:https://github.com/vmesel/GeoMath
Thanks! What differences will your package have with shapely?
https://github.com/Toblerity/Shapely
Cheers
Fabien
--
https://mail.python.org/mailman/listinfo/python-lis
Yes sure,
To add a point, you do:
From geomath import point
A = point.Point(x,y)
A.distance(PointB)
A.mispoint(PointB)
A.quadrant()
To make usage of the Figure class
From geomath import figure
Square = figure.Figure()
Square.addpoints(pointA, PointB, PointC, PointD)
To make use of the line clas
On Wednesday 04 May 2016 09:48, Vinicius Mesel wrote:
> I created a library called "GeoMath" that it's intent is to solve all
> Analytical Geometry problems in a simple way using Python.
>
> If you want to check it out, here is the link:
> https://github.com/vmesel/GeoMath
>
> And if you want to
Hey guys,
I'm back after some time in the darkness(lol).
So I'm here to announce my contribution for the mathematicians and physicians
and other guys who love geometry like me!
I created a library called "GeoMath" that it's intent is to solve all
Analytical Geometry problems in a simple wa
I have created Python with Oracle Database Course, and offer 50% discount till
10-5-2016.
Any one interested in course just click on below link.
https://www.udemy.com/using-python-with-oracle-db/?
Then write coupon Code=PYTHON_ORACLE_50%25
--
https://mail.python.org/mailman/listinfo/python
Hi guys,
I don't know if here is right place for asking this question, if not, please
help me route to the right place.
I do some simple tests on custom opcode for python.
1. change opcode.h:
for example:
#define PRINT_EXPR 70
#define PRINT_ITEM 71
#define PRINT_NEWLINE 72
#defin
On 2014-01-26 02:46, ngangsia akumbo wrote:
> Is it possible to write cartoon with 3D images using python?
>
> If yes , please locate me some resources. thank
Check out Blender which can be scripted using Python.
-tkc
--
https://mail.python.org/mailman/listinfo/python-list
On Sunday, January 26, 2014 11:55:34 AM UTC+1, Mark Lawrence wrote:
> On 26/01/2014 10:46, ngangsia akumbo wrote:
>
>
>
> What have you done to locate resources for yourself?
I have searched but not found something very clear. That is why i asked.
--
https://mail.python.org/mailman/listinfo/p
On 26/01/2014 10:46, ngangsia akumbo wrote:
Is it possible to write cartoon with 3D images using python?
If yes , please locate me some resources. thank
What have you done to locate resources for yourself?
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can
Is it possible to write cartoon with 3D images using python?
If yes , please locate me some resources. thank
--
https://mail.python.org/mailman/listinfo/python-list
In article ,
JL wrote:
> Python is my favorite language. Very often, I am forced to use other
> languages like php because of better library support for web applications. Is
> it possible to write functions in python and then get php to call these
> functions?
At one time, Songza was half PH
On Sat, Dec 14, 2013 at 12:42 PM, JL wrote:
> Python is my favorite language. Very often, I am forced to use other
> languages like php because of better library support for web applications. Is
> it possible to write functions in python and then get php to call these
> functions?
What sort of
Python is my favorite language. Very often, I am forced to use other languages
like php because of better library support for web applications. Is it possible
to write functions in python and then get php to call these functions?
Thank you
--
https://mail.python.org/mailman/listinfo/python-list
Is there anyone out there who uses Python with Delphi, or knows someone who
uses Python with Delphi or who used to use Python with Delphi? The latest
version of "Python for Delphi" (P4D) works fine with Python 2.5 and Delphi
2007, but not for Python 2.7. Any assistance gratefull
Hi,
I am not so familiar with Python, I just want to use the multicorn external
data wrapper and plpythonu2 language with PostgreSQL, my question is which
option to specify when build Python 3.3 with shared libraries from source.
Regards,
Xiaobo Gu--
http://mail.python.org/mailman/listinfo/
On Wed, May 15, 2013 at 12:15 PM, dieter wrote:
>
> If Python would automatically redecorate overridden methods in a derived
> class, I would have no control over the process. What if I need
> the undecorated method or a differently decorated method (an
> uncached or differently cached met
"Mr. Joe" writes:
> ...
> Sorry for digging this old topic back. I see that my "'property' does not
> play well with polymorphic code" comment generated some controversy. So
> here's something in my defense:
I did not intend to "attack" you.
> ...
> Yes, I like decorators and descriptors. I also
Sorry for digging this old topic back. I see that my "'property' does not
play well with polymorphic code" comment generated some controversy. So
here's something in my defense:
Here's the link to stackoveflow topic I am talking about:
http://stackoverflow.com/questions/237432/python-properties-a
On Fri, 03 May 2013 13:52:23 +0600, Mr. Joe wrote:
> Thanks for clearing up. Developers of python should address this issue,
> in my opinion. 3.4/3.5 maybe, but better late than never.
>
> Recently, I've been beaten back for using some exotic features of
> python.
What do you consider "exotic"?
"Mr. Joe" writes:
> ...
> Then I came to know that 'property' does not play well
> with polymorphic code. :(
Can you elaborate?
I like "polymorphic code" and decorators (such a "property")
never met a problem with the two working nicely together.
> I resorted to some lambda hacks learned from
Thanks for clearing up. Developers of python should address this issue, in
my opinion. 3.4/3.5 maybe, but better late than never.
Recently, I've been beaten back for using some exotic features of python.
One is this[ Took me hours to get to the bottom ]. The other one is
'property' decorator. I wa
On Fri, 03 May 2013 05:34:40 +0600, Mr. Joe wrote:
> Is there any way to raise the original exception that made the call to
> __getattr__?
No. There is some discussion on the Python-Dev mailing list about adding
better error reporting to AttributeError, but that may not go anywhere,
and even i
Is there any way to raise the original exception that made the call to
__getattr__? I seem to stumble upon a problem where multi-layered attribute
failure gets obscured due to use of __getattr__. Here's a dummy code to
demonstrate my problems:
"""
import traceback
class BackupAlphabet(object):
On 16/04/2013 03:02, Renato Barbosa Pim Pereira wrote:
I am trying to execute cgi101.py:
#!/usr/bin/python
import cgi
form = cgi.FieldStorage() # parse form data
print('Content-type: text/html\n')# hdr plus blank line
print('Reply Page')# html reply page
if not
I am trying to execute cgi101.py:
#!/usr/bin/python
import cgi
form = cgi.FieldStorage() # parse form data
print('Content-type: text/html\n')# hdr plus blank line
print('Reply Page')# html reply page
if not 'user' in form:
print('Who are you?')
else:
print
Hi
I'm trying to build Python 3.3.0 on Windows using Visual Studio 2010 Express.
I opened the solution (pcbuild.sln) and built the "python" project (including
its dependencies of course) and that worked fine with just a few warnings.
But I need to build Python using the the static C runtime s
Hi,
We are looking for some guidance in installing an upgraded
Python on our cluster. Our cluster was installed with Rocks 6.0,
is running CentOs 6.2, and has python-2.6.6, gcc-4.4.6. We
would like to install an upgraded version of Python along with
the following modules
NumPy
Scipy (which w
because
homebrew installs tk and tcl in separate directories and then soft-links them
to /usr/local/lib. When I install python with this method, it breaks tkinter
with the following error:
```
>>> import Tkinter; root = Tkinter.Tk()
Traceback (most recent call last):
File "
On Sun, Jun 10, 2012 at 8:44 AM, Yesterday Paid
wrote:
>
> I'm planning to learn one more language with my python.
> Someone recommended to do Lisp or Clojure, but I don't think it's a
> good idea(do you?)
> So, I consider C# with ironpython or Java with Jython.
> It's a hard choice...I like Visua
On Fri, 15 Jun 2012, Terry Reedy wrote:
> On 6/15/2012 1:03 PM, Tomasz Rola wrote:
>
> > Last time I checked, Python didn't have linked lists - arrayed lists are
> > nice, but their elements can't be automatically GC-ed (or, this requires
> > very nontrivial GC algorithm), the easiest way I can t
On 6/15/2012 3:04 PM, Paul Rubin wrote:
Terry Reedy writes:
Python iterators can do lazy evaluation. All the builtin classes come
with a corresponding iterator. ...
I wouldn't say iterators do lazy evaluation in the Scheme or Haskell
sense. Lazy evaluation imho means evaluation is deferred u
Terry Reedy writes:
> Python iterators can do lazy evaluation. All the builtin classes come
> with a corresponding iterator. ...
I wouldn't say iterators do lazy evaluation in the Scheme or Haskell
sense. Lazy evaluation imho means evaluation is deferred until you
actually try to use the value,
On 6/15/2012 1:03 PM, Tomasz Rola wrote:
Last time I checked, Python didn't have linked lists - arrayed lists are
nice, but their elements can't be automatically GC-ed (or, this requires
very nontrivial GC algorithm), the easiest way I can think would be
replacing them with None manually. I'm no
Alexander Blinne writes:
> An Element of s could be discarded, after every one of the three (k*j
> for k in s)-generators went over it. I don't think that this is possible
> with one deque (at least with the built-in merger of heapq, a
> self-written one could be adapted). Storing everything three
On Fri, 15 Jun 2012, Alexander Blinne wrote:
> How do Haskell or Scheme determine when elements are not longer needed?
Just like Python, they use garbage collection - in one sentence, if it can
be proved the object (not a OO-object, just a piece of data) will no
longer be needed, it can be safe
On 15.06.2012 09:00, Paul Rubin wrote:
> Alexander Blinne writes:
>>> def gen_s():
>>> s = [1]
>>> m = skipdups(heapq.merge(*[(lambda j: (k*j for k in s))(n) for n in
>>> [2,3,5]]))
>>> yield s[0]
>>> while True:
>>> k = m.next()
>>> s.append(k)
>>> yield k
>
> Nice. I
Alexander Blinne writes:
>> def gen_s():
>> s = [1]
>> m = skipdups(heapq.merge(*[(lambda j: (k*j for k in s))(n) for n in
>> [2,3,5]]))
>> yield s[0]
>> while True:
>> k = m.next()
>> s.append(k)
>> yield k
Nice. I wouldn't have been sure that "for k in s" worked prop
>>http://blog.tmorris.net/understanding-practical-api-design-static-typing-and-functional-programming/
>
> When I'm satisfied with a program, it has this ethereal property that
> if the problem is slightly altered, the program is only slightly
> altered.
One thing I find with Haskell: the type sys
In article <7xwr3fjff8@ruckus.brouhaha.com>,
Paul Rubin wrote:
>Matej Cepl writes:
>> The point is that you are never interested in learning *a language*,
>> everybody who has at least some touch with programming can learn most
>> languages in one session in the afternoon.
>
>Really, that's
1 - 100 of 539 matches
Mail list logo