100% found this document useful (1 vote)
21 views

(eBook PDF) Practice of Computing Using Python, The 3rd Edition instant download

The document promotes various eBook downloads available at ebookluna.com, including titles on Python programming, creative writing, and nursing practice. It provides direct links to specific eBooks and emphasizes instant access to these resources. The content also outlines the structure and topics covered in the 'Practice of Computing Using Python, 3rd Edition' textbook.

Uploaded by

killebolic
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
21 views

(eBook PDF) Practice of Computing Using Python, The 3rd Edition instant download

The document promotes various eBook downloads available at ebookluna.com, including titles on Python programming, creative writing, and nursing practice. It provides direct links to specific eBooks and emphasizes instant access to these resources. The content also outlines the structure and topics covered in the 'Practice of Computing Using Python, 3rd Edition' textbook.

Uploaded by

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

Quick and Easy Ebook Downloads – Start Now at ebookluna.

com for Instant Access

(eBook PDF) Practice of Computing Using Python,


The 3rd Edition

https://ebookluna.com/product/ebook-pdf-practice-of-
computing-using-python-the-3rd-edition/

OR CLICK BUTTON

DOWLOAD EBOOK

Instantly Access and Download Textbook at https://ebookluna.com


We believe these products will be a great fit for you. Click
the link to download now, or visit ebookluna.com
to discover even more!

(eBook PDF) Introduction to Programming Using Python An 1

https://ebookluna.com/product/ebook-pdf-introduction-to-programming-using-
python-an-1/

(eBook PDF) Numerical Analysis: Mathematics of Scientific Computing 3rd

https://ebookluna.com/product/ebook-pdf-numerical-analysis-mathematics-of-
scientific-computing-3rd/

(eBook PDF) The Practice of Creative Writings 3rd Edition

https://ebookluna.com/product/ebook-pdf-the-practice-of-creative-
writings-3rd-edition/

The Physics of Computing 1st Edition Marilyn Wolf - eBook PDF

https://ebookluna.com/download/the-physics-of-computing-ebook-pdf/
(eBook PDF) The Doctor of Nursing Practice Essentials 3rd Edition

https://ebookluna.com/product/ebook-pdf-the-doctor-of-nursing-practice-
essentials-3rd-edition/

(eBook PDF) Python Programming in Context 3rd Edition

https://ebookluna.com/product/ebook-pdf-python-programming-in-context-3rd-
edition/

Python Programming in Context, 3rd Edition (eBook PDF)

https://ebookluna.com/product/python-programming-in-context-3rd-edition-
ebook-pdf/

(eBook PDF) The Speaker: The Tradition and Practice of Public Speaking 3rd

https://ebookluna.com/product/ebook-pdf-the-speaker-the-tradition-and-
practice-of-public-speaking-3rd/

(eBook PDF) The Nurse, The Math, The Meds: Drug Calculations Using
Dimensional Analysis 3rd Edition

https://ebookluna.com/product/ebook-pdf-the-nurse-the-math-the-meds-drug-
calculations-using-dimensional-analysis-3rd-edition/
THE PRACTICE OF COMPUTING USING

3RD EDITION

WILLIAM RICHARD
PUNCH • ENBODY
C O N T E N T S

VIDEONOTES xxiv
PREFACE xxv
PREFACE TO THE SECOND EDITION xxix
1.0.1 Data Manipulation xxx
1.0.2 Problem Solving and Case Studies xxx
1.0.3 Code Examples xxx
1.0.4 Interactive Sessions xxxi
1.0.5 Exercises and Programming Projects xxxi
1.0.6 Self-Test Exercises xxxi
1.0.7 Programming Tips xxxi

PART 1 THINKING ABOUT COMPUTING 1


Chapter 0 The Study of Computer Science 3
0.1 Why Computer Science? 3
0.1.1 Importance of Computer Science 3
0.1.2 Computer Science Around You 4
0.1.3 Computer “Science” 4
0.1.4 Computer Science Through Computer Programming 6
0.2 The Difficulty and Promise of Programming 6
0.2.1 Difficulty 1: Two Things at Once 6
0.2.2 Difficulty 2: What Is a Good Program? 9
0.2.3 The Promise of a Computer Program 10
0.3 Choosing a Computer Language 11
0.3.1 Different Computer Languages 11
0.3.2 Why Python? 11
0.3.3 Is Python the Best Language? 13
0.4 What Is Computation? 13
0.5 What Is a Computer? 13

vii
viii CONTENTS

0.5.1 Computation in Nature 14


0.5.2 The Human Computer 17
0.6 The Modern, Electronic Computer 18
0.6.1 It’s the Switch! 18
0.6.2 The Transistor 19
0.7 A High-Level Look at a Modern Computer 24
0.8 Representing Data 26
0.8.1 Binary Data 26
0.8.2 Working with Binary 27
0.8.3 Limits 28
0.8.4 Representing Letters 29
0.8.5 Representing Other Data 30
0.8.6 What Does a Number Represent? 31
0.8.7 How to Talk About Quantities of Data 32
0.8.8 How Much Data Is That? 32
0.9 Overview of Coming Chapters 34

P A R T 2 S TA RT I N G T O P R O G R A M 35
Chapter 1 Beginnings 37
1.1 Practice, Practice, Practice 37
1.2 QuickStart, the Circumference Program 38
1.2.1 Examining the Code 40
1.3 An Interactive Session 42
1.4 Parts of a Program 43
1.4.1 Modules 43
1.4.2 Statements and Expressions 43
1.4.3 Whitespace 45
1.4.4 Comments 46
1.4.5 Special Python Elements: Tokens 46
1.4.6 Naming Objects 48
1.4.7 Recommendations on Naming 49
1.5 Variables 49
1.5.1 Variable Creation and Assignment 50
1.6 Objects and Types 53
1.6.1 Numbers 55
1.6.2 Other Built-In Types 57
1.6.3 Object Types: Not Variable Types 58
1.6.4 Constructing New Values 60
CONTENTS ix

1.7 Operators 61
1.7.1 Integer Operators 61
1.7.2 Floating-Point Operators 64
1.7.3 Mixed Operations 64
1.7.4 Order of Operations and Parentheses 65
1.7.5 Augmented Assignment Operators: A Shortcut! 66
1.8 Your First Module, Math 68
1.9 Developing an Algorithm 69
1.9.1 New Rule—Testing 73
1.10 Visual Vignette: Turtle Graphics 74
1.11 What’s Wrong with My Code? 75
Chapter 2 Control 87
2.1 QuickStart Control 87
2.1.1 Selection 87
2.1.2 Booleans for Decisions 89
2.1.3 The if Statement 89
2.1.4 Example: What Lead Is Safe in Basketball? 92
2.1.5 Repetition 96
2.1.6 Example: Finding Perfect Numbers 100
2.1.7 Example: Classifying Numbers 105
2.2 In-Depth Control 109
2.2.1 True and False: Booleans 109
2.2.2 Boolean Variables 110
2.2.3 Relational Operators 110
2.2.4 Boolean Operators 115
2.2.5 Precedence 116
2.2.6 Boolean Operators Example 117
2.2.7 Another Word on Assignments 120
2.2.8 The Selection Statement for Decisions 122
2.2.9 More on Python Decision Statements 122
2.2.10 Repetition: the while Statement 126
2.2.11 Sentinel Loop 136
2.2.12 Summary of Repetition 136
2.2.13 More on the for Statement 137
2.2.14 Nesting 140
2.2.15 Hailstone Sequence Example 142
2.3 Visual Vignette: Plotting Data with Pylab 143
2.3.1 First Plot and Using a List 144
2.3.2 More Interesting Plot: A Sine Wave 145
x CONTENTS

2.4 Computer Science Perspectives: Minimal Universal Computing 147


2.4.1 Minimal Universal Computing 147
2.5 What’s Wrong with My Code? 148
Chapter 3 Algorithms and Program Development 161
3.1 What Is an Algorithm? 161
3.1.1 Example Algorithms 162
3.2 Algorithm Features 163
3.2.1 Algorithm versus Program 163
3.2.2 Qualities of an Algorithm 165
3.2.3 Can We Really Do All That? 167
3.3 What Is a Program? 167
3.3.1 Readability 167
3.3.2 Robust 171
3.3.3 Correctness 172
3.4 Strategies for Program Design 173
3.4.1 Engage and Commit 173
3.4.2 Understand, Then Visualize 174
3.4.3 Think Before You Program 175
3.4.4 Experiment 175
3.4.5 Simplify 175
3.4.6 Stop and Think 177
3.4.7 Relax: Give Yourself a Break 177
3.5 A Simple Example 177
3.5.1 Build the Skeleton 178
3.5.2 Output 178
3.5.3 Input 179
3.5.4 Doing the Calculation 181

P A R T 3 D AT A S T R U C T U R E S A N D F U N C T I O N S 187
Chapter 4 Working with Strings 189
4.1 The String Type 190
4.1.1 The Triple-Quote String 190
4.1.2 Nonprinting Characters 191
4.1.3 String Representation 191
4.1.4 Strings as a Sequence 192
4.1.5 More Indexing and Slicing 193
4.1.6 Strings Are Iterable 198
CONTENTS xi

4.2 String Operations 199


4.2.1 Concatenation (+) and Repetition (*) 199
4.2.2 Determining When + Indicates Addition or
Concatenation? 200
4.2.3 Comparison Operators 201
4.2.4 The in Operator 202
4.2.5 String Collections Are Immutable 203
4.3 A Preview of Functions and Methods 205
4.3.1 A String Method 205
4.3.2 Determining Method Names and Method Arguments 208
4.3.3 String Methods 210
4.3.4 String Functions 210
4.4 Formatted Output for Strings 211
4.4.1 Descriptor Codes 212
4.4.2 Width and Alignment Descriptors 213
4.4.3 Floating-Point Precision Descriptor 214
4.5 Control and Strings 215
4.6 Working with Strings 218
4.6.1 Example: Reordering a Person’s Name 218
4.6.2 Palindromes 220
4.7 More String Formatting 223
4.8 Unicode 226
4.9 A GUI to Check a Palindrome 228
4.10 What’s Wrong with My Code? 232
Chapter 5 Functions—QuickStart 245
5.1 What Is a Function? 245
5.1.1 Why Have Functions? 246
5.2 Python Functions 247
5.3 Flow of Control with Functions 250
5.3.1 Function Flow in Detail 251
5.3.2 Parameter Passing 251
5.3.3 Another Function Example 253
5.3.4 Function Example: Area of a Triangle 254
5.3.5 Functions Calling Functions 258
5.3.6 When to Use a Function 259
5.3.7 What If There Is No Return Statement? 260
5.3.8 What If There Are Multiple Return Statements? 260
xii CONTENTS

5.4 Visual Vignette: Turtle Flag 261


5.5 What’s Wrong with My Code? 262
Chapter 6 Files and Exceptions I 271
6.1 What Is a File? 271
6.2 Accessing Files: Reading Text Files 271
6.2.1 What’s Really Happening? 272
6.3 Accessing Files: Writing Text Files 273
6.4 Reading and Writing Text Files in a Program 274
6.5 File Creation and Overwriting 275
6.5.1 Files and Functions Example: Word Puzzle 276
6.6 First Cut, Handling Errors 282
6.6.1 Error Names 283
6.6.2 The try-except Construct 283
6.6.3 try-except Flow of Control 284
6.6.4 Exception Example 285
6.7 Example: Counting Poker Hands 288
6.7.1 Program to Count Poker Hands 291
6.8 GUI to Count Poker Hands 299
6.8.1 Count Hands Function 300
6.8.2 The Rest of the GUI Code 302
6.9 Error Check Float Input 304
6.10 What’s Wrong with My Code? 304
Chapter 7 Lists and Tuples 311
7.1 What Is a List? 311
7.2 What You Already Know How To Do With Lists 313
7.2.1 Indexing and Slicing 314
7.2.2 Operators 315
7.2.3 Functions 317
7.2.4 List Iteration 318
7.3 Lists Are Different than Strings 319
7.3.1 Lists Are Mutable 319
7.3.2 List Methods 320
7.4 Old and New Friends: Split and Other Functions and Methods 325
7.4.1 Split and Multiple Assignment 325
7.4.2 List to String and Back Again, Using join 326
7.4.3 The Sorted Function 327
CONTENTS xiii

7.5 Working with Some Examples 328


7.5.1 Anagrams 328
7.5.2 Example: File Analysis 334
7.6 Mutable Objects and References 340
7.6.1 Shallow versus Deep Copy 345
7.6.2 Mutable versus Immutable 349
7.7 Tuples 350
7.7.1 Tuples from Lists 352
7.7.2 Why Tuples? 353
7.8 Lists: The Data Structure 353
7.8.1 Example Data Structure 354
7.8.2 Other Example Data Structures 355
7.9 Algorithm Example: U.S. EPA Automobile Mileage Data 355
7.9.1 CSV Module 365
7.10 Visual Vignette: Plotting EPA Data 366
7.11 List Comprehension 368
7.11.1 Comprehensions, Expressions, and the Ternary
Operator 370
7.12 Visual Vignette: More Plotting 370
7.12.1 Pylab Arrays 371
7.12.2 Plotting Trigonometric Functions 373
7.13 GUI to Find Anagrams 374
7.13.1 Function Model 374
7.13.2 Controller 375
7.14 What’s Wrong with My Code? 377
Chapter 8 More on Functions 395
8.1 Scope 395
8.1.1 Arguments, Parameters, and Namespaces 397
8.1.2 Passing Mutable Objects 399
8.1.3 Returning a Complex Object 401
8.1.4 Refactoring evens 403
8.2 Default Values and Parameters as Keywords 404
8.2.1 Example: Default Values and Parameter Keywords 405
8.3 Functions as Objects 407
8.3.1 Function Annotations 408
8.3.2 Docstrings 409
xiv CONTENTS

8.4 Example: Determining a Final Grade 410


8.4.1 The Data 410
8.4.2 The Design 410
8.4.3 Function: weighted_grade 411
8.4.4 Function: parse_line 411
8.4.5 Function: main 412
8.4.6 Example Use 413
8.5 Pass “by Value” or “by Reference” 413
8.6 What’s Wrong with My Code? 414
Chapter 9 Dictionaries and Sets 423
9.1 Dictionaries 423
9.1.1 Dictionary Example 424
9.1.2 Python Dictionaries 425
9.1.3 Dictionary Indexing and Assignment 425
9.1.4 Operators 426
9.1.5 Ordered Dictionaries 431
9.2 Word Count Example 432
9.2.1 Count Words in a String 432
9.2.2 Word Frequency for Gettysburg Address 433
9.2.3 Output and Comments 437
9.3 Periodic Table Example 438
9.3.1 Working with CSV Files 439
9.3.2 Algorithm Overview 441
9.3.3 Functions for Divide and Conquer 441
9.4 Sets 445
9.4.1 History 445
9.4.2 What’s in a Set? 445
9.4.3 Python Sets 446
9.4.4 Methods, Operators, and Functions for Python Sets 447
9.4.5 Set Methods 447
9.5 Set Applications 452
9.5.1 Relationship between Words of Different 452
9.5.2 Output and Comments 456
9.6 Scope: The Full Story 456
9.6.1 Namespaces and Scope 457
9.6.2 Search Rule for Scope 457
9.6.3 Local 457
9.6.4 Global 458
9.6.5 Built-Ins 462
9.6.6 Enclosed 463
CONTENTS xv

9.7 Using zip to Create Dictionaries 464


9.8 Dictionary and Set Comprehensions 465
9.9 Visual Vignette: Bar Graph of Word Frequency 466
9.9.1 Getting the Data Right 466
9.9.2 Labels and the xticks Command 467
9.9.3 Plotting 467
9.10 GUI to Compare Files 468
9.10.1 Controller and View 469
9.10.2 Function Model 471
9.11 What’s Wrong with My Code? 473
Chapter 10 More Program Development 483
10.1 Introduction 483
10.2 Divide and Conquer 483
10.2.1 Top-Down Refinement 484
10.3 The Breast Cancer Classifier 484
10.3.1 The Problem 484
10.3.2 The Approach: Classification 485
10.3.3 Training and Testing the Classifier 485
10.3.4 Building the Classifier 485
10.4 Designing the Classifier Algorithm 487
10.4.1 Divided, now Conquer 490
10.4.2 Data Structures 491
10.4.3 File Format 491
10.4.4 The make_training_set Function 492
10.4.5 The make_test_set Function 496
10.4.6 The train_classifier Function 497
10.4.7 train_classifier, Round 2 499
10.4.8 Testing the Classifier on New Data 502
10.4.9 The report_results Function 506
10.5 Running the Classifier on Full Data 508
10.5.1 Training versus Testing 508
10.6 Other Interesting Problems 512
10.6.1 Tag Clouds 512
10.6.2 S&P 500 Predictions 514
10.6.3 Predicting Religion with Flags 517
10.7 GUI to Plot the Stock Market 519
10.7.1 Function Model 519
10.7.2 Controller and View 521
Visit https://testbankfan.com
now to explore a rich
collection of testbank or
solution manual and enjoy
exciting offers!
xvi CONTENTS

P A R T 4 C L A S S E S , M A K I N G Y O U R O W N D AT A S T R U C T U R E S
AND ALGORITHMS 527
Chapter 11 Introduction to Classes 529
11.1 QuickStart: Simple Student Class 529
11.2 Object-Oriented Programming 530
11.2.1 Python Is Object-Oriented! 530
11.2.2 Characteristics of OOP 531
11.3 Working with OOP 531
11.3.1 Class and Instance 531
11.4 Working with Classes and Instances 532
11.4.1 Built-In Class and Instance 532
11.4.2 Our First Class 534
11.4.3 Changing Attributes 536
11.4.4 The Special Relationship Between an Instance and
Class: instance-of 537
11.5 Object Methods 540
11.5.1 Using Object Methods 540
11.5.2 Writing Methods 541
11.5.3 The Special Argument self 542
11.5.4 Methods Are the Interface to a Class Instance 544
11.6 Fitting into the Python Class Model 545
11.6.1 Making Programmer-Defined Classes 545
11.6.2 A Student Class 545
11.6.3 Python Standard Methods 546
11.6.4 Now There Are Three: Class Designer, Programmer,
and User 550
11.7 Example: Point Class 551
11.7.1 Construction 553
11.7.2 Distance 553
11.7.3 Summing Two Points 553
11.7.4 Improving the Point Class 554
11.8 Python and OOP 558
11.8.1 Encapsulation 558
11.8.2 Inheritance 559
11.8.3 Polymorphism 559
11.9 Python and Other OOP Languages 559
11.9.1 Public versus Private 559
11.9.2 Indicating Privacy Using Double Underscores (__) 560
CONTENTS xvii

11.9.3 Python’s Philosophy 561


11.9.4 Modifying an Instance 562
11.10 What’s Wrong with My Code? 562
Chapter 12 More on Classes 571
12.1 More About Class Properties 571
12.1.1 Rational Number (Fraction) Class Example 572
12.2 How Does Python Know? 574
12.2.1 Classes, Types, and Introspection 574
12.2.2 Remember Operator Overloading 577
12.3 Creating Your Own Operator Overloading 577
12.3.1 Mapping Operators to Special Methods 578
12.4 Building the Rational Number Class 581
12.4.1 Making the Class 581
12.4.2 Review Fraction Addition 583
12.4.3 Back to Adding Fractions 586
12.4.4 Equality and Reducing Rationals 590
12.4.5 Divide and Conquer at Work 593
12.5 What Doesn’t Work (Yet) 593
12.5.1 Introspection 594
12.5.2 Repairing int + Rational Errors 596
12.6 Inheritance 598
12.6.1 The “Find the Attribute” Game 599
12.6.2 Using Inheritance 602
12.6.3 Example: The Standard Model 603
12.7 What’s Wrong with My Code? 608
Chapter 13 Program Development with Classes 615
13.1 Predator–Prey Problem 615
13.1.1 The Rules 616
13.1.2 Simulation Using Object-Oriented Programming 617
13.2 Classes 617
13.2.1 Island Class 617
13.2.2 Predator and Prey, Kinds of Animals 619
13.2.3 Predator and Prey Classes 622
13.2.4 Object Diagram 623
13.2.5 Filling the Island 623
13.3 Adding Behavior 626
13.3.1 Refinement: Add Movement 626
13.3.2 Refinement: Time Simulation Loop 629
xviii CONTENTS

13.4 Refinement: Eating, Breeding, and Keeping Time 630


13.4.1 Improved Time Loop 631
13.4.2 Breeding 634
13.4.3 Eating 636
13.4.4 The Tick of the Clock 637
13.5 Refinement: How Many Times to Move? 638
13.6 Visual Vignette: Graphing Population Size 639

PART 5 BEING A BETTER PROGRAMMER 643


Chapter 14 Files and Exceptions II 645
14.1 More Details on Files 645
14.1.1 Other File Access Methods, Reading 647
14.1.2 Other File Access Methods, Writing 649
14.1.3 Universal New Line Format 651
14.1.4 Moving Around in a File 652
14.1.5 Closing a File 654
14.1.6 The with Statement 654
14.1.7 Text File Encodings; Unicode 655
14.2 CSV Files 656
14.2.1 CSV Module 657
14.2.2 CSV Reader 658
14.2.3 CSV Writer 659
14.2.4 Example: Update Some Grades 659
14.3 Module: os 661
14.3.1 Directory (Folder) Structure 662
14.3.2 os Module Functions 663
14.3.3 os Module Example 665
14.4 More on Exceptions 667
14.4.1 Basic Exception Handling 668
14.4.2 A Simple Example 669
14.4.3 Events 671
14.4.4 A Philosophy Concerning Exceptions 672
14.5 Exception: else and finally 673
14.5.1 finally and with 673
14.5.2 Example: Refactoring the Reprompting of a File Name 673
14.6 More on Exceptions 675
14.6.1 Raise 675
14.6.2 Create Your Own 676
14.7 Example: Password Manager 677
CONTENTS xix

Chapter 15 Recursion: Another Control Mechanism 687


15.1 What Is Recursion? 687
15.2 Mathematics and Rabbits 689
15.3 Let’s Write Our Own: Reversing a String 692
15.4 How Does Recursion Actually Work? 694
15.4.1 Stack Data Structure 695
15.4.2 Stacks and Function Calls 697
15.4.3 A Better Fibonacci 699
15.5 Recursion in Figures 700
15.5.1 Recursive Tree 700
15.5.2 Sierpinski Triangles 702
15.6 Recursion to Non-recursion 703
15.7 GUI for Turtle Drawing 704
15.7.1 Using Turtle Graphics to Draw 704
15.7.2 Function Model 705
15.7.3 Controller and View 706
Chapter 16 Other Fun Stuff with Python 709
16.1 Numbers 709
16.1.1 Fractions 710
16.1.2 Decimal 714
16.1.3 Complex Numbers 718
16.1.4 Statistics Module 720
16.1.5 Random Numbers 722
16.2 Even More on Functions 724
16.2.1 Having a Varying Number of Parameters 725
16.2.2 Iterators and Generators 728
16.2.3 Other Functional Programming Ideas 733
16.2.4 Some Functional Programming Tools 734
16.2.5 Decorators: Functions Calling Functions 736
16.3 Classes 741
16.3.1 Properties 742
16.3.2 Serializing an Instance: pickle 745
16.4 Other Things in Python 748
16.4.1 Data Types 748
16.4.2 Built-in Modules 748
16.4.3 Modules on the Internet 749
Chapter 17 The End, or Perhaps the Beginning 751
xx CONTENTS

APPENDICES 753
Appendix A Getting and Using Python 753
A.1 About Python 753
A.1.1 History 753
A.1.2 Python 3 753
A.1.3 Python Is Free and Portable 754
A.1.4 Installing Anaconda 756
A.1.5 Starting Our Python IDE: Spyder 756
A.1.6 Working with Python 757
A.1.7 Making a Program 760
A.2 The IPython Console 762
A.2.1 Anatomy of an iPython Session 763
A.2.2 Your Top Three iPython Tips 764
A.2.3 Completion and the Tab Key 764
A.2.4 The ? Character 766
A.2.5 More iPython Tips 766
A.3 Some Conventions for This Book 769
A.3.1 Interactive Code 770
A.3.2 Program: Written Code 770
A.3.3 Combined Program and Output 770
A.4 Summary 771
Appendix B Simple Drawing with Turtle Graphics 773
B.0.1 What Is a Turtle? 773
B.0.2 Motion 775
B.0.3 Drawing 775
B.0.4 Color 777
B.0.5 Drawing with Color 779
B.0.6 Other Commands 781
B.1 Tidbits 783
B.1.1 Reset/Close the Turtle Window 783
Appendix C What’s Wrong with My Code? 785
C.1 It’s Your Fault! 785
C.1.1 Kinds of Errors 785
C.1.2 “Bugs” and Debugging 787
C.2 Debugging 789
C.2.1 Testing for Correctness 789
C.2.2 Probes 789
C.2.3 Debugging with Spyder Example 1 789
C.2.4 Debugging Example 1 Using print() 793
Discovering Diverse Content Through
Random Scribd Documents
inguinibus meis viridis urticae fascem comprehendit, omniaque infra
umbilicum coepit lenta manu caedere. Upon which jumping from her,
to avoid the sting, I made off. The old woman in a great rage
pursu’d me, and tho’ drunk with wine, and their more hot desires,
took the right way; and follow’d me through two or three villages,
crying stop thief; but with my hands all bloody, in the hasty flight, I
got off.

National
Gallery of
Art

THE KISS

by Rodin
Metropolitan Museum of
Art

BESIDE THE SEA

by Rodin

Love manifestations and the passion for promoting weakened or


inadequate functional activity are familiar themes in the most remote
areas of the world. In the Arctic circle as well as in the Marshall
Islands. Among the Eskimo of uttermost Greenland and among the
Jibaro Indians of Equador. The Orang Kubau of Sumatra and the
Semang and Senoi of Malacca are knowledgeable in this regard. The
natives of these disparate territories are familiar with the plant and
animal life of their regions, the nuts and fruits, the herbs and leaves,
and their properties and specific virtues. They have tested them in
food and drink, and in other functional directions: and by long,
groping, deductive sequences they have come to definite practical
conclusions. They have managed to extract or to use certain
essences and elements in these roots and plants that they found
conducive to specific purposes, particularly to the primary function of
life, the erotic motif, the functional performance.
Oral traditions, the ways of the tribal society, derive, pre-
historically, from a matriarchal hierarchy. And to the women of the
tribe the obscure secrets of amorous practices and devices are all-
important. Because they are the conditions of procreation, the
source of fertility, the depositories of life and continuity. The love
mystique, then, is the primary and virtually exclusive sacrosanct
knowledge confined to the female of the tribe. Hence, after the ages
of oral transmission, when we enter upon the centuries of writing,
verbal transcription, and recording, then the sagas and chronicles,
the legends and folk consciousness, invariably dwell on the female,
the wise old woman, the witch, the adept, who possesses the arcana
of erotic functions.
In the course of undetermined time, as literary mastery grows
and develops culturally to the degree attained by Greece in the fifth
century B.C., the witch, as guardian of Aphrodite’s mysteries, is
paramount. She is known to the peasant and the hoplite, to the
cobbler and the young athlete, to the stroller in the agora, to the
serious dramatist, even to the philosophers, to Socrates, to Plato.

In classical legend, Phaon, a ferryman of Lesbos, was given a


potent periapt by Aphrodite, that made him remarkably handsome.
The poetess Sappho consequently fell passionately in love with him.
According to the Roman encyclopedist Pliny the Elder, author of the
Historia Naturalis, Phaon had found a mandrake root that resembled
the male genitalia. This root was an assurance of feminine love.
Sappho, however, is said, in the version of Ovid’s Heroides, to have
flung herself from the Leucadian rock on his account.

Xenophon, the Greek historian who belongs in the fourth


century B.C., recounts, in his Memorabilia, a dialogue between the
philosopher Socrates and a hetaira named Theodote. The subject is
the art of finding and retaining lovers.
Socrates: There are my lady friends, who will never let me leave
them, night or day. They would always be having me teach
them love-charms and incantations.
Theodote: Are you really acquainted with such things, Socrates?
Socrates: Of course I am. What else is the reason, think you, that
Apollodorus and Antisthenes never leave my side? Why have
Cebes and Simmias come all the way from Thebes to stay with
me? You may be quite sure that not without love-charms and
incantations and magic-wheels can this be brought about.
Theodote: Lend me your wheel, then, that I may use it on you.
Socrates: Nay, I do not want to be drawn to you. I want you to
come to me.
Theodote: Well, I will come. But be sure to be at home.
Socrates: I will be at home to you, unless there be some lady with
me who is dearer than yourself.

A speech attributed to the Greek orator Antiphon, who dates in


the fifth century B.C., involves a belief that love could be secured by
the administration of a potion.
The Attic orator is addressing the court:
The girl began to consider how she should administer the potion to
them, before or after dinner, and, on reflection, she decided it would be
better to give it after the meal. I will endeavor to give you a brief account
of how the potion was actually administered. The two friends partook of
a good dinner, as you can imagine, the host having a sacrifice to offer to
the god of his household and the guest being on the eve of a sea
voyage. When they had finished, they made a libation and added thereto
some grains of incense. But while they were murmuring their prayer, the
concubine slipped the poison into the wine she was pouring out for them:
and furthermore, thinking that she was doing something clever, she gave
Philoneos an extra dose, supposing that the more she gave the warmer
would be his love for her.
The important deduction that follows as a corollary from the
above passage is that the love-potion, mentioned without elaborate
comment, was already, in the fifth century B.C., a matter of common
knowledge and common use.
The plant called anciently telephilon was used by the Greeks for
amatory purposes. Botanically, it has been identified with the poppy:
and by some, with a kind of pepper tree. Theocritus, the Greek
bucolic poet, refers to its use in the third Idyll. A goatherd goes to
the cave of his sweet-heart Amaryllis. He tries to re-awaken her
former love:
I learned my fate but lately, when upon my bethinking me whether
you loved me, not even did the poppy leaf coming in contact make a
sound, but withered away just so upon my soft arm.
Lovers were accustomed to guess by the poppy leaf placed
between forefinger and thumb of the left hand, and then struck by
the right, whether their love was reciprocated. If a loud crack was
produced, it was a propitious amatory omen.

Among the ancient authorities the virtues of plants and herbs


and spices and their medicinal curative powers and also their
amatory impacts were frequently enumerated, described, and
classified. In this group belongs Dioscorides, a Greek army surgeon
who flourished in the first century A.D. His comprehensive treatise
on the subject, De Materia Medica Libri Quinque, was for centuries
consulted and used as a standard text. In the Middle Ages the
famous Portuguese Marrano physician Amatus Lusitanus produced
an excellent edition of Dioscorides. It was published, with numerous
woodcut illustrations, at Leyden in Holland, in 1558.

According to the Enquiry into Plants by Theophrastus, and


equally to the Materia Medica of the Greek army surgeon
Dioscorides, cyclamen, which is sowbread, had erotic properties. The
root of the plant was used as an ingredient in love-potions.
The plant itself produces colorful flowers, while the fleshy roots
are favored by swine: hence the old name of sowbread.
The Greek physician Dioscorides, who served as a surgeon in
the army of the Roman Emperor Nero, mentions, in his Materia
Medica, mandrake as being anciently considered efficacious in love
philtres. He also alludes to the practice in his own days, when a
concoction of the root of mandrake steeped in wine was judged to
be a favorable love-potion.

In the furious and unceasing search for some product of the


earth, some fabricated distillation, some suddenly and miraculously
discovered triumphant panacea that would efficaciously induce virile
activity, the ancients grasped at any object that, by its mere outward
and physical conformation, might conceivably have some cryptic,
symbolic association with genital resemblances, and hence with
amatory functions.
Such a resemblance was readily and gratefully found in the
mandrake. The mandrake, even in Biblical times, was credited with
unique properties, not least, with amatory stimulation.
Mandrake, or mandragore, which is botanically mandragora,
mandragora officinarum, is a tuber with purple flowers, dark-leaved.
It is native to Palestine, and hence has a Hebrew name, mentioned
in Biblical literature. It is called there dudaim, an expression
associated etymologically with love.
The peculiarity of mandrake is that it often assumes a human
shape, the limbs in particular being formed like human extremities.
From the earliest literary eras mandrake was a customary
ingredient in love-potions. Circe, the sorceress who appears in
Homer’s Odyssey, was traditionally an adept in concocting brews
with mandrake infusions. So intimately was her name linked with
this man-shaped plant, that it became known as Circe’s plant.
As later Biblical confirmation of the significance of mandrake,
the strange and moving episode of Jacob and Rachel and the
employment of the very effective mandrake may be mentioned.
There is a further suggestion of its use in the Song of Songs.
The Greeks and the Romans likewise were acquainted with
mandrake and its virtues. The Greeks considered the root an
amatory excitant, and, by association, called Aphrodite, who
presided over amatory functions, Mandragoritis, She of the
Mandrake. Plutarch, the Greek philosopher and biographer, alludes
to the plant and its resemblance to human genitalia. In his
monumental encyclopedia, the Natural History, the Roman Pliny the
Elder similarly dwells on this likeness, and adds that when a
mandrake root that has grown into male genital form is found, it will
unquestionably secure feminine love.
Without interruption the tradition of the mandrake lingered
through the centuries. Old chroniclers allude to it. Woodcuts and
illustrations in medieval vellum-bound folios present readers with the
horrifyingly semi-human form of the plant. Sinister and abhorrent
legends have grown up around the plant, many of them associated
with death, gibbets, hangings, thieves.
Medieval folklore trusted to the consumption of the root as a
reliable help in conception. This belief is also confirmed by a
seventeenth century traveler. Sorcerers and alchemists and other
occult practitioners concocted their elixirs with the aid of mandrake.
The seventeenth century English herbalist, John Gerarde, refers
to mandrake in his Herball or General Historie of Plantes, and to its
use in conception, particularly in the case of barrenness. He merely
touches on its employment in amatory practices, but he is repulsed
by the prurient and salacious nature of these devices.
In these days, too, mandrake evidently has not been neglected
as a possible invigorating agent. In Greece and in Italy, folk beliefs in
the plant still survive, and are put into active practice.

Sexual and procreative capacity was such a primal, essential


factor in the old religious cults that, in classical mythology, Greek
and Roman, and in Egyptian and Asian cults as well, the bull, the
most potent among animals, was the ceremonial and pictorial
symbol of this cosmic power. The bull, in fact, was equated with
divinity. The processional sacrifice among the Romans, the
taurobolium, highlighted the preeminence and the reverence due to
the bull. In Egypt, he appears as Apis, the bull-god. He is also
present in the Mithraic cult, and Mithra himself is sculpturally
represented as holding a bull and cutting its throat. The bull was an
expiatory sacrifice among the Germanic tribes, and also among the
Northmen. In the Orient, too, the bull is sacred among the
Japanese. Cows, also, have been no less venerated among the
Greeks, the Hebrews, and the Hindus.

An ancient Egyptian record, the Doulaq Papyrus, reveals, in the


translation by the famous Egyptologist Sir William Flinders Petrie,
how even in antiquity sexual passion was channeled, promoted, and
controlled: and how the cult of money and the phallic cult often
went hand in hand and were intimately linked together. So that
religious prostitution, the sacred erotic rites of pagan worship,
transcended the common activities of the public prostitute and
assumed a hieratic, reverential status.
This status is stressed and confirmed in the story of the sacred
prostitute or hierodule Thubui, who was approached by Setna-
Khamois, son of the Egyptian Pharaoh Usimares. In the papyrus the
lavish richness of the hierodule’s apartment is described, and the
bloody conditions she exacts from her passionate prospective lover.

In the barber shops and the perfumers’, in the furtive taverns


and the baths and eating places, in Greece and later on in Rome, the
lower types of prostitute plied their trade. They might ostensibly be
musicians and singers of a sort, but these qualifications were mere
preliminaries to their more intimate ministrations. The ways of these
harlots, their outlook, their training, their future, are described
vividly in Lucian’s Dialogues of the Courtesans and in Alciphron’s
fictional letters. The poets, too, have their say about this institution,
and many of their pieces, sensuous and sensual, erotic, scatological
and lewd, are preserved in the Greek Anthology and the Palatine
Anthology. In the collection known as The Girdle of Aphrodite, one of
the pieces deals with the theme of Lolita. Another describes the
operations of a masseuse. Others deal with amorous performances
and reflect on love and its price.

The ancient cult of Bacchus, the god of wine and fertility, was
marked by highly erotic rites and orgies and phallic manifestations.
Bacchus himself was equated with the Greek god Dionysus, whose
characteristics and functions were identical. Dionysus himself was
associated with certain animals that were reputedly extremely
lascivious by nature or erotically exceptionally dominant. Among
these animals were: the bull, the ass, the panther, and the goat. The
right testis of the ass, for instance, worn in a bracelet, was,
according to the testimony of Pliny the Elder, who produced an
encyclopedic Natural History, and the Greek physician Dioscorides,
considered an effective sexual stimulant.
In many regions of ancient Greece, both on the mainland but
particularly in the islands of the Aegean Sea, the Dionysiac cult was
prevalent and passionately celebrated.
Euripides, the Greek tragic poet, presents a detailed and
authoritative picture of Bacchic ceremonies and beliefs in his drama
The Bacchae.

Among the priests of ancient Chaldea, noted for its


thaumaturgic practices and esoteric cults, there was a tradition that
the secretions of the liver of young boys would be a restorative of
physiological vigor.

Among professional Greek and Roman courtesans, there were


special devices for provoking male interest. During entertainments,
for instance, drinking cups, made of earthenware, emitted a
perfumed aura, while the contents themselves, containing myrrh and
pepper, were direct stimulants.
In Asia Minor, some four millennia ago, the Sumerians flourished
and produced a high literary culture. There is still extant a love song,
chanted annually by the Sumerians, that is in the manner of the
Biblical Song of Songs. It is an exultant amatory paean, dedicated to
Inanna, the Sumerian goddess of love and procreation, who may be
equated with the Babylonian Astarte and the Greek Aphrodite.

Storgethron, a plant used in ancient Greece as an amatory


medicine, has been identified as the leek.

The root called surag was, in antiquity, held to have a


stimulative virtue.

The aromatic leaves of tarragon, which grows in South East


Europe, is considered, in addition to its use as a flavoring agent, as
an amatory aid.

The oil extracted from the fresh leaves of the ruta graveolens
plant produces an amatory excitation.

Both in ancient and in medieval days amatory virtues were


attributed to the plant known botanically as radix Chinae.

The juice of the plant spurge, in composition with other items


such as ginger, nettle seed, pellitory, cinnamon, and cardamom, is
considered, among Arabs, as highly provocative.

The aromatic leaves of sage had an amatory repute. So with


tulip bulbs and savory which the Romans knew as satureia.

Hierobota, or pisteriona, an herb mentioned by the medieval


philosopher Albertus Magnus, was credited with such potency that
its mere possession was said to act as a stimulant.

Pimpinella anisum, which is the botanical designation of anise, is


native to the Eastern Mediterranean region. The ancients knew
anise, and it was equally familiar to the Middle Ages, as a love
attribute.

The testes of animals have always been popular in amatory


preparations, both for their symbolic implications and also for their
genesiac value. This was the case with the testes of lamb, deer, ram,
and ass.

The head of the perch contains a number of small stones. These


were included in the amatory preparations devised by sorceresses.

A French physician, Mery, in a treatise entitled Traité Universel


des Drogues Simples, stated that the partes genitales of a rooster
served as a potent stimulus.

Partridge was, according to the old writer Platina, in his De


Valetudine Tuenda, believed, apart from its gastronomic relish, to
‘arouse the half-extinct desire for venereal pleasures.’

In antiquity, snails were consumed for amatory purposes. The


Roman poets refer to this practice. Even in modern times a
concoction of snails, boiled in parsley, garlic, and onions, and fried in
oil and again in red wine, is reputed to serve as a rejuvenating
factor.

An ancient Egyptian device for achieving amatory efficiency


involves a magic procedure:
Take a band of linen, of sixteen threads. Four of them white. Four,
green. Four, blue. Four, red. Fasten all strands into one band, and strain
with hoopoe blood. Bind with scarab posed as the sun-god wrapped in
byssus. Bind to the body of the boy attendant who holds the sacred
vessel.

The worship of the phallus in antiquity was not originally the


worship of the human generative organs, but of the divine
procreative faculty symbolized by the genitalia of the sacred bull and
the sacred goat: in Egyptian religious terminology, by Apis and
Priapis or Priapus respectively.
In Greece, the phallus, originally symbolic of the goat or bull,
was attached, disproportionately and a posteriori, to a human figure:
so that the phallus, in the course of time, became erroneously
associated with human capacity.

The Athenian orator Isocrates postulated a maxim: What is


improper to do is improper to say. Yet a rigid adherence to this view
would mean a cessation of investigations of all kinds, of many
historical records and archives, mores, and often matter that would
give enlightenment on human traditions and the more intimate
details of communal, tribal, or national life, of ethnic distinctions, of
cultural progression.
Hence it might be more advisable to adapt the postulate of
Isocrates and to introduce the proviso that whatever has been done
or said or written by men should normally and regularly be
transmitted to later generations or to wider circles, provided that this
transmission is intended as a contribution to a knowledge of the
past, or of contiguous races, or of disparate mores, and as a
revealing exposition of what man performed in earlier ages, and not
as a prurient and lewd inducement to wallow in scatological or
libidinous depths for mere light or indifferent or transitory
entertainment.
The anthropologist, the archaeologist, the professional scholar,
the historian are, by virtue of their interests and training and their
occupations, constantly dealing with subjects that have either been
taboo in a general sense, or that involve the most secretive
physiological and emotional human situations.

The ancient cult of the stars merged with religious ceremonials


and religious beliefs, emerging in the zodiacal bull. This bull was
anciently equated with the sun in its most auspicious phase, in
spring time. The sun bull later became the actual bull itself, as in the
Minoan and the Mithraic cults, and also among the Egyptians. For
the bull was now definitely the symbol of creative potency, of cosmic
fecundity and perpetuation.

The energized, salient phallus was the supreme symbol of being


and fertility. In antiquity it had divine significance. It was carried in
religious processions in ancient Egypt, in Greece, in the Greek
islands, in Phoenicia, Assyria, and in Chaldea and Ethiopia. In Egypt,
phalli, made of porcelain, were worn on the person as periapts.

In their fulminations against pagan mores and the sexual and


erotic licentiousness and aberrations that were so prevalent in
antiquity both socially and religiously, the ancient writers themselves
were so descriptively forthright and detailed in their denunciations,
that these very assaults and condemnatory attacks constitute in
themselves, cumulatively, a vast corpus of circumstantial knowledge
of ancient salaciousness, prurience, perversions, and total
abandonment of amatory and sexual restraints. Among such
witnesses and authorities were the Church Fathers Tertullian,
Arnobius, and Clement of Alexandria.
The religious practice of women submitting or rather offering
themselves to the priapic symbol, the phallus or lingam, dates back
to millennia before this era. Herodotus, the Greek historian,
mentions it; also Strabo the geographer, and the Church Father
Clement of Alexandria.
Among the ancient Moabites, the god Baal-Peor, that was at one
time worshipped by the Israelites and then execrated, was an idol
equated with the Greek and Roman phallic Priapus.

The consciousness that in Nature, in the totality of the cosmic


scheme, and in human beings the love motif conditions all existence
and the continuance of being is manifest in the images, the religious
rituals, symbols, ceremonials, and sacrificial offerings of all peoples,
in every age, ancient and modern, in Greece and among the
Romans, in pre-conquered Mexico and in India, throughout the East
and in the Pacific Islands, and among the early tribal and racial
denominations of Europe—the Germani and the Suevi, the Galli and
the Normanni.

On the banks of the Euphrates, in Syria, there was anciently a


vast, elaborate, richly decorated and endowed temple. At the
entrance rose two gigantic phalli, dedicated, as the inscription ran,
by Bacchus to the goddess Juno. Offerings were made to the phalli
by the thronging suppliants, while within the building numerous
wooden phalli were dispersed throughout the spacious interior.
Similar images and rituals were manifest in contiguous countries, in
Phoenicia, Persia, and Phrygia.

Throughout every polis and colony and settlement of ancient


Greece, and also in the regions of the Mediterranean littoral, in
Egypt and the Middle East, the phallus was a symbol of veneration
always associated with religious ritual, with hieratic traditions, and
temple worship on a wide and enthusiastic scale.
In Greece, there were the phallic hermae, enormous phalli
attached to pedestals, tree-trunks, boundary-markers. They were
protective and apotropaic, and where the phalli appeared, there
would credibly be fecundity and erotic consummation, generation
and abundance, in man and beast and throughout the cosmic
design.
The phallus was variously named Priapus and Tutunus and
Mutunus and Fascinum and, in Hindu religious mythology, the
lingam. Among the esoteric Gnostics, Jao, the sun-god, equipped
with ithyphallic force, had properties akin to those of Priapus. Thus
the generative, energizing organs of virility, of the cosmic erotic
impulse and of its purpose, are, despite variations of name and
epichorial traits and accretions, basically comprehended under one
concept, in all proto-history, in verifiable history, and, by traditional
progression, in later ages.

Antiquity, free from the modern attitude that makes


demarcations between what is obscene and what is not so,
venerated the sexual act, and its symbolic representation of the
phallus, as significant of the universal sense of generation and
procreation. As a consequence, all sexual, all amatory performances,
references, allusions were accepted as an integral element in human
life, and involved no intrusive image of salaciousness, prurience,
lewdness.
This phallic reverence, in its widest and most sweeping sense,
was especially prevalent among the ancient Greeks. But it was not
confined to this people. It was prevalent in Asia Minor, among the
Hittites and the Sumerians, the Accadians and the Parthians, the
Medes and the Babylonians and the Phoenicians. It was prevalent in
Egypt and the North African littoral, and it was equally prevalent
along the Mediterranean coastal regions. In the Far East, particularly
but not exclusively in India, the cult of the phallus was a devout
religious experience, equated with the dominant cults of the cosmic
deities.
In later ages, when the human body became as it were
dichotomous in function, the merely physiological acts began to be
held in lesser esteem, and even became condemnatory in status,
open to reproach and disdain, and even violent abuse and ill-
treatment. The body, in fact, became obscene, invested with evil
forces, compounded of malefic and defiled factors. The body was to
be crushed and tortured and disfigured, in order to release the
spiritual complements of the human being. The amatory acts were
now turned into licentious and mephitic obscenities, into bestial
defilements, into unspeakable carnal and animal manifestations of
the lower nature. As a consequence, phallic worship, the glorification
of the creative principle embodied in the male and female, went
underground. And by the mere fact of going underground, it
persisted, with qualifications, acquiring through the course of time
veneers of secrecy, accretions of furtiveness, elements of ribaldry as
a kind of protective coat.

Essentially, the phallic symbol was anciently viewed as an


amatory agent, a generative stimulant, in as much as the phallus
was cosmically the source of all being. Therefore offerings were
made to the phallus in sacrificial rituals, just as to any other potent
deity from whom privileges and favors were sought. Libations of milk
were a normal form of offering to Priapus. Women, anxious to
become mothers, stood reverently and suppliantly in puris
naturalibus before the all-potent phalli, and in a further urgent
procedure, performed the act of erotic consummation with the aid of
the lingam figure itself. For the phallus, in a pose of lubricity, was the
final appeal, the ultimate resort, of the pleading, awed, reverential
mortal.

Among cities where the generative force symbolized by the


phallus was held in deep veneration, were Orneae, Cyllene, and
Colophon. Under the later impact of Christianity, however, the phallic
cult diminished in its influence and extent, or was re-directed into
other channels. In one specific direction, the cult merged into the
Orphic mysteries.

Erotic awareness never went further than in the case of a city in


Troas named Priapus, on account of its consecration to the cult of
the phallus. There were other cities too, according to the testimony
of Pliny the Elder, that were named Priapus for identical reasons. In
the Ceramic Gulf there was an island named Priaponese: and an
island in the Aegean Sea called Priapus.

A notorious incident in Greek history involved the nocturnal


mutilation of hermae, in 415 B.C. Hermae were bronze or marble
pillars surmounted by a head and a phallus. These marble figures
appeared in the streets and squares of Athens and other Greek
cities.
Suspicion for the defilement and desecration of the hermae fell
upon the brilliant but wayward Athenian general and statesman
Alcibiades and his companions. As a result, Alcibiades was
condemned to banishment.

The cult of Priapus and his obscene association with the


genitalia of the ass, the symbol of unbridled lust, were expounded in
ancient fable and legend. Other commentaries and explanations
were added later by Hyginus, who flourished in the first century A.D.
Hyginus wrote on religious subjects and mystic cults. Pausanias, the
Greek traveler and geographer, who belongs in the second century
A.D., and Lactantius, the fourth century Church Father, also dwelt on
the subject.

Of all cities of ancient Greece, Lampsacus, situated on the


banks of the Hellespont, was most dedicated to the veneration of
Priapus. In a legendary fable it was demonstrated that the origin of
the priapic cult was Lampsacus itself.

In the Greek festival called Thargelia, celebrated in May, the


rites were dedicated to Apollo, the sun god, and to Diana, the moon
goddess. At the ceremonial there was a procession of youths who
carried olive branches hung with food, fruit, and images of phalli.
The genesiac theme, in its most lustful implication, was so
prevalent in early history that there was a sect, known as the
Baptae, dedicated to Cotytto, an obscene and lewd goddess. They
celebrated their nocturnal abominations at Athens, Corinth, in
Thrace, and on the island of Chios.
One of the peculiar features of the Baptae was their custom of
drinking from glass vessels shaped like a phallus. Juvenal, the
Roman satirist, in describing the Baptae and their mystic and
symbolic rites, refers to one participant who drinks from a glass
Priapus: vitreo bibit ille Priapo.

According to the testimony of the Greek historian Herodotus, a


certain Melampus brought the cult of Bacchus, the worship of the
generative capacity, to Greece, approximately in the thirteenth
century B.C. He expounded the features of the Egyptian cult and
established processional rites and ceremonies adapted from Egyptian
usage.

In ancient Greece Bacchus, the phallic divinity, was equated


with Dionysus. In the cities the Greater Dionysia, or the Urban
Dionysia, were celebrated in his honor for three days. The locale was
at Limnae in Attica, and the season was the middle of the month of
March.
In very early times, the Greek biographer and philosopher
Plutarch declares, the rites were of a simple but joyous nature. But
in his own time the celebration had reached a lavish, extravagant
splendor.
Women, devotees of the Bacchic symbol and known as
Bacchantes, introduced the ritualistic procession. Chaste maidens,
impeccable in morality and of distinguished birth, followed. These
were the Canephoroi, the Basket-bearers who bore on their heads
baskets containing the sacred utensils used at the celebration:
together with mystic objects, flowers, salt, sesame, and a flower-
bedecked phallus. A detachment came next to the Canephoroi: these
were the Phallophoroi. The Phallophoroi were the Phallus-bearers,
carrying, attached to long staffs, the phallic emblem.
Musicians were also in the march, chanting and accompanying
the choral odes with twanging strings, and at brief intervals emitting
loud exclamations in glorification of the god.
There were other strange participants. The Ithyphalli, men
dressed in women’s garments, who chanted salacious phallic songs.
Scandalous satyrs led goats for sacrifice, while Bacchantes
performed obscene dance movements. There was, over the entire
celebration, an atmosphere of debauchery and libidinous license
consonant with the phallic context of the cult.

In Carthage, a spot outside the city was consecrated to Astarte,


the goddess of generation, and called Sicca Veneria. Among the
Phoenicians a similar spot, intended for the same purpose, that is
religious fornication, was known as Siccoth Venoth.

In Biblical antiquity, the primary concept was for man to be


fruitful and multiply, and replenish the earth. To this end,
concubinage was consequently not frowned upon and was practiced
pari passu with marriage. Maid servants were commonly taken by
their masters as concubines, as in the case of Hagar, and also in that
of Reumah. Lot even gave his maiden daughters for the satisfaction
of the lustful inhabitants of Sodom. Later, he committed incest with
these daughters.
The servant women of Jacob, Bilhah and Zilpah, became his
concubines. These are instances, among many others, that illustrate
cases of adultery and fornication that do not appear to have had a
condemnatory stigma or reproach attached to them. For the object
in these circumstances was procreation and propagation and that
was the primal function enjoined upon man.
The corollary is that sterility is a personal reproach in Biblical
times, a social defect that is looked upon with opprobrium,
particularly in Oriental countries.
In Spain, the phallic cult was practiced under the name of
Hortanes. This cult is mentioned by the Roman epic poet, Silius
Italicus, in his Punica. He describes the orgiastic revels of Satyrs and
Maenads in nocturnal rites in honor of the Hispanic fascinum.
In the South of France, also, and in Belgium, excavations
unearthed relics, monuments, amulets and other artifacts, bas-reliefs
and antiquities of various kinds, all testifying to the ancient cult of
Priapus and his functions and the deep and wide reverence for his
omnipotence. In Germany, Priapus lost the somewhat indulgent
character of a phallic and generative deity responsive to supplication
and promise, and became a violent, blood-lusting monstrosity. In
parts of Eastern Europe, again, Priapus became Pripe-Gala,
sanguinary and destructive.

Ancient Armenia had a deity analogous to Priapus or Aphrodite


or Astarte. She was known as Diana Anaïtis, and her cult involved
temple prostitution. The same practice, on the testimony of the
Greek historian Herodotus, was in vogue in Lydia. Another writer, the
Roman geographer Pomponius Mela, who belongs in the first century
A.D., has similar references in the case of an African people called
the Augilae.
Again, the practice was prevalent at Naucratis, in Egypt.

The phallic cult, that was originally consecrated to the


propagation of all things, in as much as the fascinum itself
symbolized the sacred regeneration of all Nature, in time
degenerated so that only the phallus as such became the symbol of
lust and passion and debauchery. It became the emblem of excesses
in erotic encounters, the sign of the prostitute. Priapus actually
became an object of some contempt, a humble scarecrow of the
fields, chthonic guardian of the orchards, a subject of coarse
ribaldry, as is testified in the Latin corpus of poems known under the
name of Priapeia.
The lascivious mores of the Egyptians under the guise of
veneration of the priapic bull Apis, and their obscene dances, rituals,
and similar performances are described and commented on in great
detail by Herodotus in his History of the Persian Wars.

The genitalia and all references to the phallic image were in


very ancient times held in such sacred esteem and reverence that in
Biblical literature the inviolable sanctity of an oath was ratified by
touching the area of the genitalia, or the thigh, to use the Biblical
euphemism. The Hebrews especially held the generative organs in
the greatest respect, socially, ethnically, and religiously: and nudity
as a consequence was a matter of shameful stigma and opprobrium.
Among the Moslems too the most binding oath was taken with
respect to the sanctity of the genitalia.

In Egypt, in the temple of Isis, sacred prostitution was a regular


religious practice. Reference to this circumstance is made by the
Roman satirist, Juvenal, who calls Isis a procuress and her shrine a
rendez-vous for adulterous and libidinous practices.

Among symbolic emblems that represented, in combination, the


male and female principles of generation and fecundity, were the
Egyptian crux ansata and the seal of Solomon.

The phallic symbol was so pervasive, so potent, in the lives of


the ancients, that the priapic function and the erotic variations of the
generative performance were pictorially represented in every
conceivable form of reproduction: scenes on vases representing
perverted consummations: baskets filled with phalli that were
offered for sale to yearning women: ithyphallic figures: monuments,
lamps and other objects depicting orgiastic lubricities.
In Ezekiel 16.17 there is a reference to the phallic figure: Fecisti
tibi imagines masculinas et fornicata es in eis.

In one of the bucolic Idyls of the Greek poet Theocritus (c. 310–
c. 250 B.C.) the maiden Simaetha, in love with Delphis, who has
abandoned her, attempts to regain his love by performing certain
magic rites and making invocations to Selene, Aphrodite, and the
horrendous Hecate.
She fashions a wax image of Delphis and by sympathetic magic
anticipates the melting of his heart in correspondence with the
melting of the image.
In addition, she makes use of the magic wheel, and her refrain
throughout the performance is:
My magic wheel, draw home to me
The man I love!

Intertwined with these rituals is the further refrain, addressed to


Selene, the moon goddess:
Bethink thee of my love,
And whence it came,
My Lady Moon!

In his De Sanitate Tuenda Praecepta, Advice on keeping Well,


Plutarch, the Greek philosopher and biographer, comments on lust
and potions:
While we loathe and detest women who contrive philtres and
magic to use upon their husbands, we entrust our food and
provisions to hirelings and slaves to be all but bewitched and
drugged. If the saying of Arcesilaus, addressed to the adulterous
and licentious, appears too bitter, to the effect that ‘it makes no
difference whether a man practices lewdness in the front parlor or in
the back hall,’ yet it is not without its application to our subject. For
in very truth, what difference does it make whether a man employ
aphrodisiacs to stir and excite licentiousness for the purpose of
pleasure or whether he stimulate his taste by odors and sauces to
require, like the itch, continual scratchings and ticklings.
(Loeb)

In Greek mythology, Andromache, the wife of the Trojan warrior


Hector, was accused by Hermione, wife of Neoptolemus, of gaining
his love by means of love-potions. Euripides, the tragic poet (c. 485–
406 B.C.), refers to the situation in his drama Andromache:
Not of my philtres thy lord hateth thee,
But that thy nature is no mate for his.
That is the love-charm: woman, ’tis not beauty
That witcheth bridegrooms, nay, but nobleness.

Philtres were in actual use beyond mythological times.


Xenophon (c. 430–354 B.C.), the Greek historian, author of
Memorabilia, alludes to the practice:
“They say,” replied Socrates, “that there are certain incantations
which those who know them chant to whomsoever they please, and thus
make them their friends; and that there are also love potions which those
who know them administer to whomso they will; and are in consequence
loved by them.”

Propertius, however, the Roman elegiac poet (c. 48 B.C.–16


B.C.), refers to the futility of love potions:
Here herbs are of no avail,
nor nocturnal Cytaeis,
nor grasses brewed by the
hand of Perimede.

Cytaeis is the witch Medea: while Perimede is another witch,


called by Homer Agamede.
The Bacchic cult in Egypt is described by the Greek historian
Herodotus in Book 2 of his History of the Persian Wars:
To Bacchus, on the eve of his feast, every Egyptian sacrifices a hog
before the door of his house, which is then given back to the swineherd
by whom it was furnished, and by him carried away. In other respects
the festival is celebrated almost exactly as Bacchic festivals are in Greece,
excepting that the Egyptians have no choral dances. They also use
instead of phalli another invention, consisting of images a cubit high,
pulled by strings, which the women carry round to the villages. A piper
goes in front, and the women follow, singing hymns in honor of Bacchus.
They give a religious reason for the peculiarities of the image.

In Book 5 of The History of the Persian Wars, Herodotus


describes some of the marital customs of the Thracians:
The Thracians who live above the Crestonaeans observe the
following customs. Each man among them has several wives; and no
sooner does a man die than a sharp contest ensues among the wives
upon the question, which of them all the husband loved most tenderly;
the friends of each eagerly plead on her behalf, and she to whom the
honor is adjudged, after receiving the praises both of men and women, is
slain over the grave by the hand of her next of kin, and then buried with
her husband. The others are sorely grieved, for nothing is considered
such a disgrace.
The Thracians who do not belong to these tribes have the
customs which follow. They sell their children to traders. On their
maidens they keep no watch, but leave them altogether free, while
on the conduct of their wives they keep a most strict watch. Brides
are purchased of their parents for large sums of money.... The gods
which they worship are but three, Mars, Bacchus, and Dian.

An ancient Hittite text contains invocations and rituals intended


to remedy conditions of incapacity or lack of erotic desire.
A sacrifice is performed to Uliliyassis, continuing for three days.
Food is prepared: sacrificial loaves, grain, a pitcher of wine. The shirt
of the male suppliant is brought forth.
The suppliant bathes. He twines cords of red and of white wool.
A sheep is sacrificed. An invocation is made, beseeching help and
favor: Come to this man, the cry arises. Come down to this man.
Make his wife conceive and let him beget sons and daughters.

An Egyptian love song, belonging in the second millennium B.C.,


is still extant. The love song was usually chanted to a musical
accompaniment. The lover is addressed as sister, or brother.
The heart is sick from love, laments the victim, and no
physician, no magician can heal this disease, except the appearance
of the sister. There is abundant reference to spices, to myrrh and
incense, and the tone of the amatory supplications and yearnings is
the tone of the Song of Songs. Listlessness on the part of the love-
sick suppliant is banished, as soon as he beholds his beloved, as
soon as her arms open in embrace.

In ancient orgiastic cults, particularly those dedicated to


Dionysus and to the Syrian Baal, religious frenzies were
accompanied or stimulated by drugs, fermented drink, by rhythmic
dance movements, by tambourine, drum, and flute music that
culminated in ecstatic self-mutilation followed by wild sexual
debaucheries.

Passion, lust, incest, fornication, adultery, as well as


concubinage and polygamy, most of the sexual perversions and
aberrations that are now included under medico-psychiatric
categories, occur in the Bible, in both Testaments.
King David married eight women. On his flight from Absalom he
left ten concubines behind him. Jacob had two wives. King Solomon
had seven hundred wives and three hundred concubines.
There are instances of enduring affection too, as in the case of
Jacob, who labored for Rachel for fourteen years.
There is sudden, rapturous love at first sight, at all costs:
It happened, late one afternoon, when David arose from his couch
and was walking upon the roof of the king’s house, that he saw from the
roof a woman bathing, and the woman was very beautiful. And David
sent and inquired about the woman. And one said, “Is not this
Bathsheba, the daughter of Eliam, the wife of Uriah the Hittite?”
So David sent messengers and took her, and he lay with her.
Amnon is overwhelmed by a passionate infatuation for his half
sister Tamar. He was so tormented that he made himself sick
because of his sister. He is advised by his friend Jonadab to go to
bed and claim illness. Tamar brings him food and at this point
Amnon attempts seduction. When she suggests an approach to the
king, for permission to marry Amnon, his lust overpowers him, and
he consummates his passion. After which, in a frenzy of hate, he
banishes her.
The Song of Solomon is a paean to sexual love, an erotic
exultation, the apogee of amatory sensuality.
In the New Testament, too, there is frequent reference to
harlots and debauchees and to a variety of ‘sinners.’

Babylonian customs, in addition to the rites of temple


prostitution, included both male and female sacred concubines.
There was considerable pre-marital sexual freedom. But there was
also monogamous marriage involving rigid fidelity. Trial marriage was
acknowledged. Adultery was punished by drowning the guilty wife.
In the degenerative days of Babylon, morality broke down. Male
prostitutes rouged their cheeks and bedecked themselves with
jewelry, while the poor exposed their daughters to prostitution.
Sensuality and erotic libertinage became dominant and pervasive.

Among the Canaanites the most potent deities—Baal and El and


Asherah—were the symbols of procreation and sexuality. Hence, all
acts, all objects, all rituals associated with copulation, with the
phallus, with fecundity were divinely inspired and inherently sacred.
Ceremonials dedicated to the deities invariably included sexual
activity, sacred and ecstatic orgies. The voluptuous and sensual
character of the dedicatory rites was evidently so appealing that
they lured the Israelites into acceptance and imitation, for the deity
of the Israelites was one, supreme, without kin, without consort,
without sexuality.

The New Testament attacks pagans, particularly Roman


paganism, for unnatural sexual practices, lusts, and corrupt and
degenerate mores.

In primitive Greek society, under a primal matriarchy, the male


functioned as a kind of passive sexual partner, and virtually
thereafter as a domestic drudge.
But in the course of the centuries the male acquired dominance,
in the divine pantheon, and equally on a mortal and earthly plane,
politically, socially, and domestically.
But the concept of the inter-relationship of the sexes grew into
a concept of one primary harmonious principle of aesthetics, of
essential perfection of beauty, irrespective of sex and hence
irrespective of any compulsive admiration and appreciation of such
beauty by one sex or the other. Beauty became an entity in itself, a
sexless trait. In the Platonic dialogue, in fact, in the Symposium, the
theory is postulated that man was at one time androgynous.
The Greek hetaira or male companion was virtually a prostitute.
Sometimes she acquired a more permanent status, when she was
bought by a master and became a pallakis or concubine.
Homosexuality, on the other hand, brought no stigma to the
boys or young men involved in the practice. Because homosexuality
was a corollary, applied in practice, of the primary concept of
aesthetic beauty irrespective of sex.
In the case of women, there was the corresponding though
possibly not so widespread cult of tribadism.

The Romans cultivated sexuality, particularly in a heterosexual


direction, with great vigor and lustfulness. It was largely through the
growing consciousness of Rome as an imperial power, and through
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!

ebookluna.com

You might also like