<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="http://wiki.carl.fun/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="http://wiki.carl.fun/feed.php">
        <title>Carl&#039;s Hacking Notes - python</title>
        <description></description>
        <link>http://wiki.carl.fun/</link>
        <image rdf:resource="http://wiki.carl.fun/_media/wiki:dokuwiki.svg" />
       <dc:date>2026-04-19T13:07:48+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://wiki.carl.fun/python:isnt_java?rev=1755034492&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.carl.fun/python:mocks?rev=1747098220&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="http://wiki.carl.fun/_media/wiki:dokuwiki.svg">
        <title>Carl's Hacking Notes</title>
        <link>http://wiki.carl.fun/</link>
        <url>http://wiki.carl.fun/_media/wiki:dokuwiki.svg</url>
    </image>
    <item rdf:about="http://wiki.carl.fun/python:isnt_java?rev=1755034492&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-08-12T21:34:52+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>isnt_java</title>
        <link>http://wiki.carl.fun/python:isnt_java?rev=1755034492&amp;do=diff</link>
        <description>Python Isn&#039;t Java

Some things in Python are infeasible to implement as they existed in Java.  This page lists some things.

Threading

Python has threads, but there are several limitations.

	*  When a Future is cancelled, the task is not aware of the cancellation.  This is because there is no `mayInterruptIfRunning`.  This means cancelling a future just marks the future as cancelled, but doesn&#039;t actually notify they threads they should stop.</description>
    </item>
    <item rdf:about="http://wiki.carl.fun/python:mocks?rev=1747098220&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-05-13T01:03:40+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mocks</title>
        <link>http://wiki.carl.fun/python:mocks?rev=1747098220&amp;do=diff</link>
        <description>Python Testing

Mocks

Don&#039;t use Python mocks.   They don&#039;t work how you want. 

	*  Mocks only kind of work.   Code like `mock.patch()` Do not work at the module layer.  If your code imports the patched symbol before the patch comes in, any code that already references gets the unpatched version.  This means you have to chase down any existing references for it to work.  That in turn means Tests will work in isolation but not when part of a suite.</description>
    </item>
</rdf:RDF>
