Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
100% found this document useful (5 votes)
19 views

Function Python programming discover the power of functional programming generator functions lazy evaluation the built in itertools library and monads Second Edition Lott 2024 scribd download

Function

Uploaded by

pizzivallsp0
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (5 votes)
19 views

Function Python programming discover the power of functional programming generator functions lazy evaluation the built in itertools library and monads Second Edition Lott 2024 scribd download

Function

Uploaded by

pizzivallsp0
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Download the Full Version of textbook for Fast Typing at textbookfull.

com

Function Python programming discover the power of


functional programming generator functions lazy
evaluation the built in itertools library and
monads Second Edition Lott
https://textbookfull.com/product/function-python-
programming-discover-the-power-of-functional-programming-
generator-functions-lazy-evaluation-the-built-in-itertools-
library-and-monads-second-edition-lott/

OR CLICK BUTTON

DOWNLOAD NOW

Download More textbook Instantly Today - Get Yours Now at textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Functional Python Programming Discover the power of


functional programming generator functions lazy evaluation
the built in itertools library and monads 2nd Edition
Steven F. Lott
https://textbookfull.com/product/functional-python-programming-
discover-the-power-of-functional-programming-generator-functions-lazy-
evaluation-the-built-in-itertools-library-and-monads-2nd-edition-
steven-f-lott/
textboxfull.com

Functional Python Programming: Use a functional approach


to write succinct, expressive, and efficient Python code,
3rd Edition Lott
https://textbookfull.com/product/functional-python-programming-use-a-
functional-approach-to-write-succinct-expressive-and-efficient-python-
code-3rd-edition-lott/
textboxfull.com

Programming Microcontrollers with Python: Experience the


Power of Embedded Python 1st Edition Armstrong Subero

https://textbookfull.com/product/programming-microcontrollers-with-
python-experience-the-power-of-embedded-python-1st-edition-armstrong-
subero/
textboxfull.com

Programming Microcontrollers with Python: Experience the


Power of Embedded Python 1st Edition Armstrong Subero

https://textbookfull.com/product/programming-microcontrollers-with-
python-experience-the-power-of-embedded-python-1st-edition-armstrong-
subero-2/
textboxfull.com
Learn Python Programming Second Edition Fabrizio Romano

https://textbookfull.com/product/learn-python-programming-second-
edition-fabrizio-romano/

textboxfull.com

Trends in Functional Programming Meng Wang

https://textbookfull.com/product/trends-in-functional-programming-
meng-wang/

textboxfull.com

Python Advanced Programming: The guide to learn pyhton


programming Marcus Richards

https://textbookfull.com/product/python-advanced-programming-the-
guide-to-learn-pyhton-programming-marcus-richards/

textboxfull.com

A Concise Introduction to Programming in Python Second


Edition Mark J. Johnson

https://textbookfull.com/product/a-concise-introduction-to-
programming-in-python-second-edition-mark-j-johnson/

textboxfull.com

Programming Scala: Scalability = Functional Programming +


Objects, Third Edition Dean Wampler

https://textbookfull.com/product/programming-scala-scalability-
functional-programming-objects-third-edition-dean-wampler/

textboxfull.com
Functional Python Programming
Second Edition

Discover the power of functional programming, generator


functions, lazy evaluation, the built-in itertools library, and
monads

Steven F. Lott
BIRMINGHAM - MUMBAI
Functional Python
Programming Second
Edition
Copyright © 2018 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or
transmitted in any form or by any means, without the prior written permission of the publisher,
except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information
presented. However, the information contained in this book is sold without warranty, either express
or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable
for any damages caused or alleged to have been caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and
products mentioned in this book by the appropriate use of capitals. However, Packt Publishing
cannot guarantee the accuracy of this information.

Commissioning Editor: Merint Methew


Acquisition Editor: Sandeep Mishra
Content Development Editor: Priyanka Sawant
Technical Editor: Ketan Kamble
Copy Editor: Safis Editing
Project Coordinator: Vaidehi Sawant
Proofreader: Safis Editing
Indexer: Mariammal Chettiyar
Graphics: Jason Monteiro
Production Coordinator: Deepika Naik

First published: January 2015


Second edition: April 2018

Production reference: 1120418

Published by Packt Publishing Ltd.


Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.

ISBN 978-1-78862-706-1

www.packtpub.com
mapt.io

Mapt is an online digital library that gives you full access to


over 5,000 books and videos, as well as industry leading tools
to help you plan your personal development and advance your
career. For more information, please visit our website.
Why subscribe?
Spend less time learning and more time coding with
practical eBooks and Videos from over 4,000 industry
professionals

Improve your learning with Skill Plans built especially


for you

Get a free eBook or video every month

Mapt is fully searchable

Copy and paste, print, and bookmark content


PacktPub.com
Did you know that Packt offers eBook versions of every book
published, with PDF and ePub files available? You can upgrade
to the eBook version at www.PacktPub.com and as a print book
customer, you are entitled to a discount on the eBook copy. Get
in touch with us at service@packtpub.com for more details.

At www.PacktPub.com, you can also read a collection of free technical


articles, sign up for a range of free newsletters, and receive
exclusive discounts and offers on Packt books and eBooks.
About the author
Steven F. Lott has been programming since the '70s, when
computers were large, expensive, and rare. He's been using
Python to solve business problems for over 10 years. His other
titles with Packt Publishing include Python Essentials,
Mastering Object-Oriented Python, Functional Python
Programming, and Python for Secret Agents. Steven is
currently a technomad who lives in city along the east coast of
the U.S. You can follow his technology blog (slott-
softwarearchitect).
About the reviewer
Yogendra Sharma is a developer with experience in
architecture, design, and development of scalable and
distributed applications. He was awarded a bachelor’s degree
from the Rajasthan Technical University in computer science.
With a core interest in microservices and Spring, he also has
hands-on experience in technologies such as AWS Cloud,
Python, J2EE, NodeJS, JavaScript, Angular, MongoDB, and
Docker.

Currently, he works as an IoT and Cloud Architect at Intelizign


Engineering Services Pune.
Packt is searching for
authors like you
If you're interested in becoming an author for Packt, please
visit authors.packtpub.com and apply today. We have worked with
thousands of developers and tech professionals, just like you, to
help them share their insight with the global tech community.
You can make a general application, apply for a specific hot
topic that we are recruiting an author for, or submit your own
idea.
Preface
Functional programming offers a variety of techniques for
creating succinct and expressive software. While Python is not
a purely functional programming language, we can do a great
deal of functional programming in Python.

Python has a core set of functional programming features. This


lets us borrow many design patterns and techniques from other
functional languages. These borrowed concepts can lead us to
create succinct and elegant programs. Python's generator
expressions, in particular, negate the need to create large in-
memory data structures, leading to programs that may execute
more quickly because they use fewer resources.

We can’t easily create purely functional programs in Python.


Python lacks a number of features that would be required for
this. We don’t have unlimited recursion, for example, we don’t
have lazy evaluation of all expressions, and we don’t have an
optimizing compiler.

There are several key features of functional programming


languages that are available in Python. One of the most
important ones is the idea of functions being first-class
objects. Python also offers a number of higher-order functions.
The built-in map(), filter(), and functools.reduce() functions are
widely used in this role, and less-obvious are functions such
as sorted(), min(), and max().

We’ll look at the core features of functional programming from


a Python point of view. Our objective is to borrow good ideas
from functional programming languages and use those ideas to
create expressive and succinct applications in Python.
Who this book is for
This book is for programmers who want to create succinct,
expressive Python programs by borrowing techniques and
design patterns from functional programming languages. Some
algorithms can be expressed elegantly in a functional style; we
can—and should—adapt this to make Python programs more
readable and maintainable.

In some cases, a functional approach to a problem will also lead


to extremely high-performance algorithms. Python makes it
too easy to create large intermediate data structures, tying up
memory (and processor time.) With functional programming
design patterns, we can often replace large lists with generator
expressions that are equally expressive but take up much less
memory and run much more quickly.
What this book covers
Chapter 1 , Understanding Functional Programming, introduces
some of the techniques that characterize functional
programming. We’ll identify some of the ways to map those
features to Python. Finally, we’ll also address some ways that
the benefits of functional programming accrue when we use
these design patterns to build Python applications.

Chapter 2 , Introducing Essential Functional Concepts, delves


into six central features of the functional programming
paradigm. We’ll look at each in some detail to see how they’re
implemented in Python. We’ll also point out some features of
functional languages that don’t apply well to Python. In
particular, many functional languages have complex type-
matching rules required to support compiling and optimizing.

Chapter 3 , Functions, Iterators, and Generators, will show how


to leverage immutable Python objects, and generator
expressions adapt functional programming concepts to the
Python language. We’ll look at some of the built-in Python
collections and how we can leverage them without departing
too far from functional programming concepts.
Chapter 4 , Working with Collections, shows how you can use a
number of built-in Python functions to operate on collections
of data. This chapter will focus on a number of relatively simple
functions, such as any() and all(), which will reduce a collection
of values to a single result.

Chapter 5 , Higher-Order Functions, examines the commonly-


used higher-order functions such as map() and filter(). It also
shows a number of other functions that are also higher-order
functions as well as how we can create our own higher-order
functions.

Chapter 6 , Recursions and Reductions, teaches how to design an


algorithm using recursion and then optimize it into a high-
performance for loop. We’ll also look at some other reductions
that are widely used, including collections.Counter().

Chapter 7 , Additional Tuple Techniques, showcases a number of


ways that we can use immutable tuples (and namedtuples)
instead of stateful objects. Immutable objects have a much
simpler interface—we never have to worry about abusing an
attribute and setting an object into some inconsistent or invalid
state.

Chapter 8 , The Itertools Module, examines a number of functions


in this standard library module. This collection of functions
simplifies writing programs that deal with collections or
generator functions.
Chapter 9 , More Itertools Techniques, covers the combinatoric
functions in the itertools module. These functions are
somewhat less useful. This chapter includes some examples
that illustrate ill-considered use of these functions and the
consequences of combinatoric explosion.

Chapter 10 , The Functools Module, focuses on how to use some of


the functions in this module for functional programming. A few
functions in this module are more appropriate for building
decorators, and they are left for Chapter 11, Decorator Design
Techniques. The other functions, however, provide several
more ways to design and implement function programs.

Chapter 11 , Decorator Design Techniques, looks at how you can


look at a decorator as a way to build a composite function.
While there is considerable flexibility here, there are also some
conceptual limitations: we’ll look at ways that overly-complex
decorators can become confusing rather than helpful.

Chapter 12 , The Multiprocessing and Threading Modules, points


out an important consequence of good functional design: we
can distribute the processing workload. Using immutable
objects means that we can’t corrupt an object because of
poorly-synchronized write operations.

Chapter 13 , Conditional Expressions and the Operator Module,


lists some ways to break out of Python’s strict order of
evaluation. There are limitations to what we can achieve here.
We’ll also look at the operator module and how this can lead to
slight clarification of some simple kinds of processing.

Chapter 14 , The PyMonad Library, examines some of the features


of the PyMonad library. This provides some additional
functional programming features. It also provides a way to
learn more about monads. In some functional languages,
monads are an important way to force a particular order for
operations that might get optimized into an undesirable order.
Since Python already has strict ordering of f expressions and
statements, the monad feature is more instructive than
practical.

Chapter 15 , A Functional Approach to Web Services, shows how


we can think of web services as a nested collection of functions
that transform a request into a reply. We’ll see ways to leverage
functional programming concepts for building responsive,
dynamic web content.

Chapter 16 , Optimizations and Improvements, includes some


additional tips on performance and optimization. We’ll
emphasize techniques such as memoization, because they’re
easy to implement and can—in the right context—yield
dramatic performance improvements.
To get the most out of this
book
This book presumes some familiarity with Python 3 and
general concepts of application development. We won’t look
deeply at subtle or complex features of Python; we’ll avoid
much consideration of the internals of the language.

We’ll presume some familiarity with functional programming.


Since Python is not a functional programming language, we
can’t dig deeply into functional concepts. We’ll pick and choose
the aspects of functional programming that fit well with Python
and leverage just those that seem useful.

Some of the examples use exploratory data analysis (EDA)


as a problem domain to show the value of functional
programming. Some familiarity with basic probability and
statistics will help with this. There are only a few examples that
move into more serious data science.

You’ll need to have Python 3.6 installed and running. For more
information on Python, visit http://www.python.org/. The examples
all make extensive use of type hints, which means that the
latest version of mypy must be installed as well.
Check out https://pypi.python.org/pypi/mypy for the latest version of
mypy.

Examples in Chapter 9, More Itertools Techniques, use PIL and


Beautiful Soup 4. The Pillow fork of the original PIL library
works nicely; refer to https://pypi.python.org/pypi/Pillow/2.7.0 and http
s://pypi.python.org/pypi/beautifulsoup4/4.6.0 .

Examples in Chapter 14 , The PyMonad Library, use PyMonad;


check out https://pypi.python.org/pypi/PyMonad/1.3.

All of these packages should be installed using the following:

$ pip install pillow beautifulsoup4 PyMonad


Download the example
code files
You can download the example code files for this book from
your account at www.packtpub.com. If you purchased this book
elsewhere, you can visit www.packtpub.com/support and register to
have the files emailed directly to you.

You can download the code files by following these steps:

1. Log in or register at www.packtpub.com.


2. Select the SUPPORT tab.
3. Click on Code Downloads & Errata.
4. Enter the name of the book in the Search box and follow
the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or
extract the folder using the latest version of:

WinRAR/7-Zip for Windows

Zipeg/iZip/UnRarX for Mac

7-Zip/PeaZip for Linux


The code bundle for the book is also hosted on GitHub at http
s://github.com/PacktPublishing/Functional-Python-Programming-Second-Edition/ .
We also have other code bundles from our rich catalog of books
and videos available at https://github.com/PacktPublishing/. Check
them out!
Conventions used
There are a number of text conventions used throughout this
book.

CodeInText : Indicates code words in text, database table names,


folder names, filenames, file extensions, pathnames, dummy
URLs, user input, and Twitter handles. Here is an example:
"Python has other statements, such as global or nonlocal, which
modify the rules for variables in a particular namespace."

A block of code is set as follows:

s = 0
for n in range(1, 10):
if n % 3 == 0 or n % 5 == 0:
s += n
print(s)

When we wish to draw your attention to a particular part of a


code block, the relevant lines or items are set in bold:

s = 0
for n in range(1, 10):
if n % 3 == 0 or n % 5 == 0:
s += n
print(s)
Any command-line input or output is written as follows:

$ pip install pillow beautifulsoup4 PyMonad

Bold: Indicates a new term, an important word, or words that


you see onscreen. For example, words in menus or dialog boxes
appear in the text like this. Here is an example: "For our
purposes, we will distinguish between only two of the many
paradigms: functional programming and imperative pro
gramming."

Warnings or important notes appear like this.

Tips and tricks appear like this.


Get in touch
Feedback from our readers is always welcome.

General feedback: Email feedback@packtpub.com and mention the


book title in the subject of your message. If you have questions
about any aspect of this book, please email us at
questions@packtpub.com.

Errata: Although we have taken every care to ensure the


accuracy of our content, mistakes do happen. If you have found
a mistake in this book, we would be grateful if you would report
this to us. Please visit www.packtpub.com/submit-errata, selecting your
book, clicking on the Errata Submission Form link, and
entering the details.

Piracy: If you come across any illegal copies of our works in


any form on the Internet, we would be grateful if you would
provide us with the location address or website name. Please
contact us at copyright@packtpub.com with a link to the material.

If you are interested in becoming an author: If there is a


topic that you have expertise in and you are interested in either
writing or contributing to a book, please visit authors.packtpub.com.
Reviews
Please leave a review. Once you have read and used this book,
why not leave a review on the site that you purchased it from?
Potential readers can then see and use your unbiased opinion
to make purchase decisions, we at Packt can understand what
you think about our products, and our authors can see your
feedback on their book. Thank you!

For more information about Packt, please visit packtpub.com.


Another Random Scribd Document
with Unrelated Content
Ophthalmia, 261
Orfili tribe, 332
Oshar, a plant, 258
Ostrich, eggshells of, 97, 335, 336; drawings of, 335
Ovens, 73
Owana. See Owanat
Owanat, 130, 165, 197, 198, 300, 303, 305, 319-321

“Pace” eggs, 257


Palestine, 307
Pan-Islam, 20
Patron Saints, 132, 182
Peridots, 55
Persian dynasty in Egypt, 315
Perthes, Justus, map of, 321
Petrified wood, 90, 212
Phthisis, 261
Pigeons, 284
Pilgrimage to Mecca, 260
Pirate hordes, 214
Pneumonia, 261
“Pool of ink.” See Mandal
Pope, the, 106
Post office in Mut, 139
Pottery, 98, 318; dug up, 211, 214, 223
Pounding rice, 43, 265
Proportion, small sense of, in bedawin, 95
“Punishment of the Grave,” 255

Qadria dervishes, 134


Qala’a es Suri, 53
Qalamun, 48, 154, 317, 318
Qara, 23, 24, 28-34, 245; el Qara, 304
Qasr Dakhl, 40, 56-64, 83, 203, 236, 317; Sheykhs of, 57
„ Dush, 314, 315
„ el ’Aini hospital, 146
„ el Guehda, 32, 315
„ el Jaj Ahmer, 334
„ Farafra, 224-230, 244, 304, 319
„ Lebakha, 136, 137
„ Zaiyan, 32, 305, 314, 315
Qena, 293, 305
Qoreish tribe, 57
Qom el Gennah, 312
Quail, 230, 284
Qway, Hassan Qway, guide, 26, 27, 33, 35, 57, 62, 89, 102-105, 112-114, 123-
125, 132, 134-136, 138, 146-148, 150-152, 154-156, 158-161, 164-179,
182-192, 196-198, 221
Qwaytin Mohammed Said, guide, 199-212, 215-218, 220-222, 224, 225, 228,
231-235, 238, 239, 243, 245

Raba’a, a six-year-old camel, 35


Rabiat, a camel saddle, 33
Rahmania dervishes, 20
Railways, 23, 27, 28
Rain, 98, 291, 310
Rashida, 41, 48-57, 184, 193, 263-265, 317
Rashida, ’omda of, 45, 48-56, 76, 110, 144, 194
Rats, 88, 97, 288-292
Ravens, 284
“Reappearance” of the Senussi Mahdi, 109
Red Sea, 306
Redir, a hollow where rain-water collects, 97, 311
Refar, tribute, 20
Remedies for diseases, 261, 262
Reshaida tribe, 332
Resoling a camel, 35
Results of journeys, 246
Rice, 43
Rim, Loder’s gazelle, 282
Ringworm, 227
Roadh, a clump of bushes in the desert, 215, 311
Roads, caravan, 304-306, 309
Roads, disused, 77, 82, 87, 97, 98, 101, 112, 128, 130, 131, 135, 213, 215,
294, 305, 321
Rockets, use of, 176
Rohlfs, Gerard, 18, 52, 53, 84, 85, 297-299, 304
Rosaries, 186
Rotunda hospital, 146
Royal Geographical Society, 18, 214
Rushwork mats, etc., 314
Rusuf, a form of sand erosion, 28, 202, 308

Safar, an Arab month, 249


Sagia, a wheel for raising water, 75, 145
Sahara, 17
St. Thomas’s hospital, 146
St. Vitus’s Dance, 261
Saj, griddle, 34, 207
Salah Nejem ed Din, Turkish Sultan, 260
Saline land, 41, 229, 244, 280, 294
Salutations, 37
Sand and sand dunes, 18, 21, 31, 32, 36, 47, 48, 75, 77, 80, 82, 84, 85, 96, 97,
115, 127, 136, 203, 220, 221, 223, 225, 235, 236, 244, 246, 247, 262, 263,
293, 294, 299, 300, 302-307, 309, 318
Sand erosion, 28, 29, 202, 204, 216, 224, 308
Sand grouse, 284, 288
Sand storms, 93, 94, 234, 235, 307
Saraf. See Mandal
Sarra well, 296
“Satan’s country,” 47, 81
“Saying the fatha,” a marriage ceremony, 252
Schweinfurth, Prof., 315
Scorpions, 262, 282; charm against, 251, 258; scorpion proof platform, 282
“Seal of Solomon,” 332, 334
Sedis, seven-year-old camel, 35
“Sieving the baby” ceremony, 249, 250
Selima Oasis, 295, 305, 321
Senussia, the Senussi dervishes, 18-20, 25, 40, 60, 106-109, 131-134, 138,
139, 144-149, 154, 156-160, 183, 186, 190, 196-199, 207, 217, 223, 228,
229, 233, 245, 293, 301, 304, 319
Senussi, Sheykh of Mut, 44, 146, 147, 154, 237, 241
Senussi, Sheykh of Smint, 40, 184
Senussi invasion of Egypt, threatened, 106-109, 127
Senussi Mahdi, 106-109
Sha’aban, an Arab month, night of the middle of, ceremonies, 258, 259
Shadhlia dervishes, 109, 133, 182
Shadhly, Sheykh, founder of the Shadhlia, 109, 133
Shaduf, a machine for raising water, 48
Shager ed Durr, a Turkish Sultana, 260
Shebb, 305
Shellala Dehrania, 335
Shem en Nessim, smelling the breeze, an Egyptian feast, 193, 257
Sheykh, a religious or tribal leader
Sheykh Adam, tree of, 48
Sheykh el Afrit. See Magician
Shia Moslems, 256
Shurbuji family, 48
Sickle, toothed, 264
Sidra, Gulf of, 17
Sif, a longitudinal dune, 221, 235
Sight, keenness of, among bedawin, 85, 86, 180
“Silver fish,” 283
Simum, hot wind, 89, 90, 161, 257
Singing of camel drivers, 268-270
Sitra lake, 302, 304, 309
Siwa Oasis, 18, 53, 293, 301, 302, 304, 307, 319
Slave traders, 97, 320
Smint, 38, 146, 241, 317
Smint el Kharab, ruins, 37, 328
Smint, ’omda of, 38, 41
Smoking, 25, 39, 40, 227, 229
Snake bites, 282
Snakes, 251, 282, 283, 286
Snipe, 284
Sofut, a form of sand erosion, 87, 88, 97
Sohag, 305
Sollum, 146
Solomon, King, 54
“Song of the Sands,” 99, 100
Soul, tree with a, 48, 49, 263
Sound, clearness of, in desert, 171
Sparks. See Electricity
Spiders, 282
Spotted fox seen, 281
Statistics, 260, 261, 317-319
Storks, 288
Suleyman Awad, Sheykh, 24-27, 134-136, 148, 149
Sultan of Turkey, 106
Sundial, human, 313
Sunni Moslems, 106
Sunt, acacia
Sunt ’Abd en Nebi, 264
Superstitions, 48, 49, 113, 119, 140, 143, 145, 151, 152, 187, 194, 201, 212,
217, 249-251, 257, 262, 270-279, 286
Surat el Mulk, part of the Koran read after a funeral, 254
Surk, 199
Surveying methods, 86, 219, 223, 224
Sutary, clown, 252
Swallows, 287
Swimming bath, 193
Swing cradles, 260

Tabl beladi, a drum, 252


Tahdir, magician’s medium, 272-279
Taiserbo, 301
Talisman, 142, 143, 263
Taal’at, 105
Tamtam, tambourine, 72
Tar, tambourine, 253
Tarantulas, 282
Tawarek race, 25, 199, 335
Tchonemyris, ruined town, 314
Tea drinking, 39, 261
Temples. See Qasr
Tenida, 37, 157, 185, 241, 283, 303, 305, 317
Tenida, ’omda of, 139, 157, 241
Terfawi, 321
Thenni, four-year-old camel, 35
Thirst, expedients in case of, 170, 171
Thothmes III, 314
Thought transference, 278, 279
Thunderstorm, 99
Tibbus, 208, 210, 236, 295, 298, 301
Tibesti, 17, 109, 207, 210, 299, 301
Tidikelt, 334
Tifinagh, writing of the Tawarek, 25, 330, 334
Tijania dervishes, 20
Tikeru, 131, 296, 298, 299, 306
Tilho, Col., 297, 299, 300, 303, 320, 335
Timbuktu, 199
Tollab, 296-299
Town crier of Mut, 139, 140
Tracking Qway, 164-179
Tracks of cart, 83; of issulla, 285, 286; permanence of, in desert, 83, 87; of
Senussi couriers, 82, 83, 98
Trade winds, 306
Traps, 266-268
Treasure-hunting, 51, 58, 59, 76, 79, 144, 145, 203-223, 279
“Tree of extremity,” 258
Tree with a soul, 48
Tree worship, traces of, 263, 264
Trial of Qway, 187-191, 196
Tripoli, 107, 131, 135, 304
Tuggurt, 302
Tulsim, Talisman
Tumas, 305
Tunis, 21
Tunisian libraries, 19
Tunnelled streets, 313
Turkish revolution, 105, 106, 127
Turks in Kufara, 109
Twat Oases, 302, 330, 334, 335

Ulad ben Miriam tribe, 330


Ulad Mahmud tribe, 330
Um el Atham, 296
Um Shaloba, Mushaluba, 296

Valley of the Bedayat, 303


“Valley of the Mist,” 89, 92, 95, 96, 111, 151, 153, 154
“Valley of the Rat,” 88, 90, 95, 178
Vegetation. See Flora
Veil worn by women, 277
Venereal diseases, 261
Veterinary methods, 76, 204, 205
Viper, 283, 286

Wad Ghirh Oases, 302, 310, 311


„ Igharghar, 301, 302
„ Ighargharen, 301
„ Mihero, 301
„ Saura, 301
Wady Dom, 299
„ el Far. See “Valley of the Rat”
„ el Fardy, 301, 302, 304, 319
„ el Fede, 301
„ el Muluk, 54
„ esh Shabur. See “Valley of the Mist”
„ Howar, 297, 302
„ Howash, 298
„ Kafut, 297
„ Kobay, 297
„ Ko’or, 302
„ Kuttum, 297, 303
„ Medjoures, 296
„ Meleeat, 297
„ Moghara, 304
„ Natrun, 304
„ Tibbu, 301
Wahatis, natives of the oases, 248
Wakwak islands, 214
Wall paintings, 314
Wanjunga Kebir, 131, 296, 300, 306
Wanjunga Sgheir, 131, 296, 300, 306
Wanjungat, the district containing the above two places
Waran, a large lizard, 285
Washing in the desert, 118
Wasm, tribal camel brand, 24-26, 73, 235, 330-333
Water, action of, in forming depressions, 294
Water tanks, 132, 161-164
“Watermelon” desert. See battikh
Wayta Kebir, 296, 298
Wayta Sgheir, 296, 298
Weather, 92, 98, 99
Wehda. See Qasr el Guehda
Wells. See Cultivation
Wind-blown grass, 96, 97
Wind scoop, 123
Wind shelters, 116, 117
Winds, 97, 299, 300, 306, 307, 310; influence of, in desert, 307-310
Wissa, Dr., 144-146
Wolves, 281, 288
Wood, petrified, 90

Yum Ashura, ceremonies on 10th of Moharrem, 256, 257


Yussef Effendi, tangerine oranges, 49

Zabit, police officer


Zaghawa tribe, 297
Zaiyan. See Qasr
Zawia, monastery, 20
„ at ’Ain Sheykh Murzuk, 225, 230
„ at Hindau, 238
„ at Qasr Dakhl, 40, 60-64, 134, 144, 145, 229, 242
„ at Qasr Farafra, 223, 228, 229
„ at Smint, 40, 154, 184
Zeffet el Arusa, procession of the bride, 252, 253
Zemzemia, water bag, 132
Zerzura Oasis, 51-54, 57, 58, 63, 75, 76, 78, 100, 101, 128, 145, 299, 304
Ziania dervishes, 20, 182
Zoazi tribe, 330
Zodiacal light, 307
Zowia tribe, 330
FOOTNOTES:

[1]Trifolium Alexandrinum, L.
[2]Medicago Sativa (Lucerne).
[3]An ardeb = 300 lbs.
[4]Peasant of the Nile Valley or oasis.
[5]“The Libyan Desert from Native Information,” R.G.S.J.,
Sept., 1913.
[6]“Travels in the Libyan Desert,” R.G.S.J., Feb., 1912.
[7]“The Farafra Depression and Bu Mungar hattia,” R.G.S.J.,
Nov., 1913.
[8]“The Farafra Depression and Bu Mungar hattia,” R.G.S.J.,
Nov., 1913, pp. 455-461.
[9]“Travels in the Libyan Desert,” R.G.S.J., Feb., 1912.
[10]See R.G.S.J. “The Nature and Formation of Sand Ripples
and Dunes,” March, 1916, pp. 189-209. “Study of a Dune Belt,”
January, 1918, pp. 16-33. Discussion on the latter paper, April,
1918, pp. 250-258.
[11]“Customs, Superstitions and Songs of the Western Oases,”
Cairo, Aug., 1914.
[12]“Irrigation in Dakhla Oasis,” R.G.S.J., Nov., 1917.
[13]“The Geographical Distribution of some Plants from the
Libyan Desert,” Cairo, Oct., 1913.
[14]Calotropis procera.
[15]Malva parviflora, L.
[16]p. 146.
[17]p. 262.
[18]“North American Deserts.” Prof. D. T. MacDougal, R.G.S.J.
Vol. XXXIX, No. 2.
[19]“Problems in Exploration: Africa.” By F. R. Cana, R.G.S.J.,
Nov., 1911, p. 464.
[20]See also “The Libyan Desert from Native Information,”
R.G.S.J., Sept., 1913.
[21]Hassanein Bey’s observations have shown that Rohlfs’
position for Boema in Kufara is some twenty-five miles in error.
[22]See note on p. 319.
[23]“The Sand Dunes of the Libyan Desert.” By H. L. Beadnell,
R.G.S. Vol. XXXV, p. 383
[24]p. 96.
[25]See p. 90.
[26]“Note sur quelques stations nouvelles, ou peu connu, de
pierres écrites du Sahara,” par M. Q. B. M. Flamand.
[27]Waddington and Hanbury, “Journal of a Visit to some parts
of Ethiopia,” 1882. Published by John Murray, Albemarle Street,
London, 268.
[28]Oric Bates, “Nomad Burials in Marmarica.” “Man,” Vol. XII.
No. 10.
[29]“Note sur quelques stations nouvelles, ou peu connu, de
pierres écrites du Sahara,” par G. M. B. Flamand, p. 9.
[30]Referred to by G. B. M. Flamand, op. cit.
Transcriber's note:

pg 181 Changed: excessively attentuated to: attenuated


pg 205 Changed: probably ocherous to: ochreous
pg 223 Changed: for my longtitudes to: longitudes
pg 256 Changed: is the anniversay to: anniversary
pg 341 Changed: See Qasr el Gushda to: Guehda
The illustrations, 'Senussi Zawia at Smint', 'Old ’Alem, “Valley of the Mist”', listed
both under HALF-TONES and IN THE TEXT in the LIST OF ILLUSTRATIONS have
been removed from the HALF-TONES section.
Grouped-together captions within a plate have been individually placed under each
of their corresponding illustrations.
Minor changes in punctuation have been done silently.
Other spelling inconsistencies have been left unchanged.
New original cover art included with this eBook is granted to the public domain.
*** END OF THE PROJECT GUTENBERG EBOOK MYSTERIES
OF THE LIBYAN DESERT ***

Updated editions will replace the previous one—the old editions


will be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States copyright
in these works, so the Foundation (and you!) can copy and
distribute it in the United States without permission and without
paying copyright royalties. Special rules, set forth in the General
Terms of Use part of this license, apply to copying and
distributing Project Gutenberg™ electronic works to protect the
PROJECT GUTENBERG™ concept and trademark. Project
Gutenberg is a registered trademark, and may not be used if
you charge for an eBook, except by following the terms of the
trademark license, including paying royalties for use of the
Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such
as creation of derivative works, reports, performances and
research. Project Gutenberg eBooks may be modified and
printed and given away—you may do practically ANYTHING in
the United States with eBooks not protected by U.S. copyright
law. Redistribution is subject to the trademark license, especially
commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the


free distribution of electronic works, by using or distributing this
work (or any other work associated in any way with the phrase
“Project Gutenberg”), you agree to comply with all the terms of
the Full Project Gutenberg™ License available with this file or
online at www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand,
agree to and accept all the terms of this license and intellectual
property (trademark/copyright) agreement. If you do not agree to
abide by all the terms of this agreement, you must cease using
and return or destroy all copies of Project Gutenberg™
electronic works in your possession. If you paid a fee for
obtaining a copy of or access to a Project Gutenberg™
electronic work and you do not agree to be bound by the terms
of this agreement, you may obtain a refund from the person or
entity to whom you paid the fee as set forth in paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only


be used on or associated in any way with an electronic work by
people who agree to be bound by the terms of this agreement.
There are a few things that you can do with most Project
Gutenberg™ electronic works even without complying with the
full terms of this agreement. See paragraph 1.C below. There
are a lot of things you can do with Project Gutenberg™
electronic works if you follow the terms of this agreement and
help preserve free future access to Project Gutenberg™
electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright
law in the United States and you are located in the United
States, we do not claim a right to prevent you from copying,
distributing, performing, displaying or creating derivative works
based on the work as long as all references to Project
Gutenberg are removed. Of course, we hope that you will
support the Project Gutenberg™ mission of promoting free
access to electronic works by freely sharing Project
Gutenberg™ works in compliance with the terms of this
agreement for keeping the Project Gutenberg™ name
associated with the work. You can easily comply with the terms
of this agreement by keeping this work in the same format with
its attached full Project Gutenberg™ License when you share it
without charge with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.

1.E. Unless you have removed all references to Project


Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project
Gutenberg™ work (any work on which the phrase “Project
Gutenberg” appears, or with which the phrase “Project
Gutenberg” is associated) is accessed, displayed, performed,
viewed, copied or distributed:

This eBook is for the use of anyone anywhere in the United


States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it
away or re-use it under the terms of the Project Gutenberg
License included with this eBook or online at
www.gutenberg.org. If you are not located in the United
States, you will have to check the laws of the country where
you are located before using this eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is


derived from texts not protected by U.S. copyright law (does not
contain a notice indicating that it is posted with permission of the
copyright holder), the work can be copied and distributed to
anyone in the United States without paying any fees or charges.
If you are redistributing or providing access to a work with the
phrase “Project Gutenberg” associated with or appearing on the
work, you must comply either with the requirements of
paragraphs 1.E.1 through 1.E.7 or obtain permission for the use
of the work and the Project Gutenberg™ trademark as set forth
in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is


posted with the permission of the copyright holder, your use and
distribution must comply with both paragraphs 1.E.1 through
1.E.7 and any additional terms imposed by the copyright holder.
Additional terms will be linked to the Project Gutenberg™
License for all works posted with the permission of the copyright
holder found at the beginning of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files
containing a part of this work or any other work associated with
Project Gutenberg™.
1.E.5. Do not copy, display, perform, distribute or redistribute
this electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the
Project Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must, at
no additional cost, fee or expense to the user, provide a copy, a
means of exporting a copy, or a means of obtaining a copy upon
request, of the work in its original “Plain Vanilla ASCII” or other
form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™
works unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or


providing access to or distributing Project Gutenberg™
electronic works provided that:

• You pay a royalty fee of 20% of the gross profits you derive from
the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt that
s/he does not agree to the terms of the full Project Gutenberg™
License. You must require such a user to return or destroy all
copies of the works possessed in a physical medium and
discontinue all use of and all access to other copies of Project
Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project


Gutenberg™ electronic work or group of works on different
terms than are set forth in this agreement, you must obtain
permission in writing from the Project Gutenberg Literary
Archive Foundation, the manager of the Project Gutenberg™
trademark. Contact the Foundation as set forth in Section 3
below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on,
transcribe and proofread works not protected by U.S. copyright
law in creating the Project Gutenberg™ collection. Despite
these efforts, Project Gutenberg™ electronic works, and the
medium on which they may be stored, may contain “Defects,”
such as, but not limited to, incomplete, inaccurate or corrupt
data, transcription errors, a copyright or other intellectual
property infringement, a defective or damaged disk or other
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like