<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Developer Circle Mombasa on Medium]]></title>
        <description><![CDATA[Stories by Developer Circle Mombasa on Medium]]></description>
        <link>https://medium.com/@devcmombasa?source=rss-2f82f4e328de------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*B9Y3VbMTQB-uyrQ-.jpg</url>
            <title>Stories by Developer Circle Mombasa on Medium</title>
            <link>https://medium.com/@devcmombasa?source=rss-2f82f4e328de------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 10:52:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@devcmombasa/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Know your facilitator!]]></title>
            <link>https://medium.com/@devcmombasa/know-your-facilitator-84e1ad4a0364?source=rss-2f82f4e328de------2</link>
            <guid isPermaLink="false">https://medium.com/p/84e1ad4a0364</guid>
            <category><![CDATA[facilitator]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Developer Circle Mombasa]]></dc:creator>
            <pubDate>Mon, 12 Aug 2019 14:28:26 GMT</pubDate>
            <atom:updated>2019-08-12T15:01:01.017Z</atom:updated>
            <content:encoded><![CDATA[<p>Developer Circle Mombasa holds weekly meetups based on 4 different fields.</p><h3>Python</h3><blockquote>Python is an object-oriented programming language created by Guido Rossum in 1989. It is ideally designed for rapid prototyping of complex applications.</blockquote><p>John Kibe<br><a href="https://www.facebook.com/sirpatrick.oginga">Patrick Oginga</a><br><a href="https://www.facebook.com/mildred.ochieng.923">Mildred Ochieng</a></p><h3>Javascript</h3><blockquote>JavaScript is a lightweight, interpreted programming language. It is designed for creating network-centric applications. It is complimentary to and integrated with Java. JavaScript is very easy to implement because it is integrated with HTML. It is open and cross-platform.</blockquote><p><a href="https://www.facebook.com/pinches.ulemseh">Peter Mugenyi</a><br><a href="https://www.facebook.com/mozeago">Moses Asiago</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*9FBY0ILYdEH-GaY3Vp93Jw.png" /><figcaption>know your facilitator!</figcaption></figure><h3>IOT/C++</h3><blockquote>The C++ programming language was created by Bjarne Stroustrup and his team at Bell Laboratories (AT&amp;T, USA) to help implement simulation projects in an object-oriented and efficient way.</blockquote><p><a href="https://www.facebook.com/fatima.ahmed.549">Fatima Ahmed</a><br><a href="https://www.facebook.com/elim.quarlos">Elkanah Maina</a><br><a href="https://www.facebook.com/collins.okumu.779">Collins Okumu</a></p><h3>Blockchain</h3><blockquote>In general, blockchain is a sequence of blocks containing some sort of data. The word “blockchain” was first used to describe the Bitcoin cryptocurrency. Usually, when we say blockchain, we understand it as an open, distributed ledger.</blockquote><p><a href="https://www.facebook.com/bozzie.williams">William Bozzie</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84e1ad4a0364" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 types of Python Functions]]></title>
            <link>https://medium.com/facebook-developer-circle-mombasa/5-types-of-python-functions-6d2f42481d27?source=rss-2f82f4e328de------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d2f42481d27</guid>
            <category><![CDATA[python-generators]]></category>
            <category><![CDATA[functions-in-python]]></category>
            <category><![CDATA[callable]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[developer]]></category>
            <dc:creator><![CDATA[Developer Circle Mombasa]]></dc:creator>
            <pubDate>Thu, 18 Jul 2019 21:28:27 GMT</pubDate>
            <atom:updated>2019-07-18T21:28:27.448Z</atom:updated>
            <content:encoded><![CDATA[<p>Function: a mapping of domain to range<br>mapping[domain] == range</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*_iEY4KLHCnGzr5dKVMb-cQ.jpeg" /></figure><h3><strong>Function definition</strong></h3><p><em>map domain to range</em></p><pre>def name(params):</pre><pre>    body</pre><pre>    return <em>expression</em></pre><p>A function is a block of code that is used to perform a single or related action. It may be reusable or just have a single use. It must have a <em>def a</em>nd sometimes has a<em> return expression.</em></p><p>Example of a function that adds two parameters:</p><pre>def even(num):<br>    return (num % 2) == 0</pre><h3><strong>High Order Functions</strong></h3><p><em>apply other functions</em></p><p>This are functions that can take a function as a parameter and can return a function as a result.</p><pre>def name(function, value):</pre><pre>    print(function, value)<br>    <br>    return function(value</pre><p>can be used like:</p><pre>&gt;&gt;&gt;list(map(even, [1,2, 3, 4]))</pre><pre>[False, True, False, True]</pre><p>map function applied <em>even()</em> to each value to the list. <br>As if we did this</p><pre>[even(1), even(2), even(3), even(4)]</pre><h3><strong>Function wrapper(around objects)</strong></h3><p>Wrapper functions can be used as an interface to adapt to the existing codes, so as to save you from modifying your codes back and forth.</p><p>They are used to provide <a href="https://www.geeksforgeeks.org/polymorphism-in-python/">polymorphism</a>.</p><pre>def my_decorator(func):<br>    def wrapper():<br>        print(&quot;Something is happening before the function is called.&quot;)<br>        func()<br>        print(&quot;Something is happening after the function is called.&quot;)<br>    return wrapper<br><br>def say_whee():<br>    print(&quot;Whee!&quot;)<br><br>say_whee = my_decorator(say_whee)</pre><pre>&gt;&gt;&gt; say_whee()<br>Something is happening before the function is called.<br>Whee!<br>Something is happening after the function is called.</pre><p>Python allows you to <strong>use decorators in a simpler way with the </strong><strong>@ symbol</strong>, sometimes called the <a href="https://www.python.org/dev/peps/pep-0318/#background">“pie” syntax</a>.</p><pre>def my_decorator(func):<br>    def wrapper():<br>        print(&quot;Something is happening before the function is called.&quot;)<br>        func()<br>        print(&quot;Something is happening after the function is called.&quot;)<br>    return wrapper<br><br>@my_decorator<br>def say_whee():<br>    print(&quot;Whee!&quot;)</pre><h3><strong>Lambdas</strong></h3><p><em>one time use functions</em></p><p>Is an anonymous function, with no name and a single expression in its body. A lambda can be used where writing an entire function is an overkill.</p><pre>lambda <em>arguments </em>: <em>expression</em></pre><p>how to use it:</p><pre>x = lambda a : a + 10<br>print(x(5))</pre><h3><strong>Callable object</strong></h3><p><em>stateful functions(non-idempotent)</em></p><p>In order to make a callable work you have to define a method <em>__call__,</em> after importing the callable function and defining a subclass of it in a class.</p><pre><em>def__call__():</em></pre><pre><em>   return expression</em></pre><p>Create an instance of the class and this becomes the callable object.<br>The syntax of callable() is:</p><pre>callable(object)</pre><p>The callable() method takes a single argument object.</p><p>The callable() method returns:</p><ul><li>True - if the object appears callable</li><li>False - if the object is not callable.</li></ul><p>How callable() works?</p><pre>from collections.abc import callable</pre><pre>class Foo(callable):<br>  def __call__(self):<br>    print(&#39;Print Something&#39;)</pre><pre>print(callable(Foo))</pre><pre><br>Output: True</pre><p>The callable is a super class that implements an error check, that if you did not implement the double underscore call method, it will raise an exception if you try to raise an instance of the class.</p><h3><strong>Generator Functions &amp; Yield</strong></h3><p><em>iterable sequence of in-memory collection</em></p><p>Python generators generate values <em>one at a time</em> from a given sequence, instead of giving the entirety of the sequence at once.</p><p>The yield statement pauses the function and saves the local state so that it can be resumed right where it left off.</p><pre># Regular function<br>def function_a():<br>    return &quot;a&quot;<br><br># Generator function<br>def generator_a():<br>    yield &quot;a&quot;</pre><pre>function_a()<br>&gt;&gt;&gt; &quot;a&quot;<br><br>generator_a()<br><br>&gt;&gt;&gt; &lt;generator object a at 0x000001565469DA98&gt;</pre><p>The two functions above perform exactly same action (returning/yielding the same string). However, if you try to inspect the generator function, it won’t match what the regular function shows.</p><p>Generator objects execute when next() is called:</p><pre>&gt;&gt;&gt; next(val)</pre><p>To get a better understanding of functions and how they work, listen to Steve Lott’s explanation of the different python types and subscribe to his channel.</p><p><a href="https://www.youtube.com/watch?v=pK8NCdfYq-M">https://www.youtube.com/watch?v=pK8NCdfYq-M</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d2f42481d27" width="1" height="1" alt=""><hr><p><a href="https://medium.com/facebook-developer-circle-mombasa/5-types-of-python-functions-6d2f42481d27">5 types of Python Functions</a> was originally published in <a href="https://medium.com/facebook-developer-circle-mombasa">Facebook Developer Circle:Mombasa</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>